diff --git a/kubernetes/apps/observability/kustomization.yaml b/kubernetes/apps/observability/kustomization.yaml index 92f677bd..7b5d56c6 100644 --- a/kubernetes/apps/observability/kustomization.yaml +++ b/kubernetes/apps/observability/kustomization.yaml @@ -8,6 +8,7 @@ resources: # Flux-Kustomizations - ./alertmanager/ks.yaml - ./gatus/ks.yaml + - ./node-exporter/ks.yaml - ./prometheus-operator-crds/ks.yaml - ./vector-agent/ks.yaml - ./vector-aggregator/ks.yaml diff --git a/kubernetes/apps/observability/node-exporter/app/helmrelease.yaml b/kubernetes/apps/observability/node-exporter/app/helmrelease.yaml new file mode 100644 index 00000000..4ea4971e --- /dev/null +++ b/kubernetes/apps/observability/node-exporter/app/helmrelease.yaml @@ -0,0 +1,44 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: &app node-exporter +spec: + interval: 30m + chartRef: + kind: OCIRepository + name: prometheus-node-exporter + namespace: flux-system + driftDetection: + mode: enabled + install: + crds: CreateReplace + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + crds: CreateReplace + remediation: + retries: 3 + values: + fullnameOverride: *app + podLabels: + jobLabel: node-exporter + releaseLabel: true + extraArgs: + - --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/) + - --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$ + service: + portName: http-metrics + prometheus: + monitor: + enabled: true + jobLabel: jobLabel + attachMetadata: + node: true + relabelings: + - sourceLabels: [__meta_kubernetes_pod_node_name] + targetLabel: instance + rbac: + pspEnabled: false diff --git a/kubernetes/apps/observability/node-exporter/app/kustomization.yaml b/kubernetes/apps/observability/node-exporter/app/kustomization.yaml new file mode 100644 index 00000000..17cbc72b --- /dev/null +++ b/kubernetes/apps/observability/node-exporter/app/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml diff --git a/kubernetes/apps/observability/node-exporter/ks.yaml b/kubernetes/apps/observability/node-exporter/ks.yaml new file mode 100644 index 00000000..b332a136 --- /dev/null +++ b/kubernetes/apps/observability/node-exporter/ks.yaml @@ -0,0 +1,20 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: &app node-exporter + namespace: flux-system +spec: + targetNamespace: observability + commonMetadata: + labels: + app.kubernetes.io/name: *app + path: ./kubernetes/apps/observability/node-exporter/app + prune: true + sourceRef: + kind: GitRepository + name: theshire + wait: false + interval: 30m + retryInterval: 1m