Merge pull request #550 from 3dwardch3ng/infra/prometheus

add infra app prometheus-exporters
This commit is contained in:
2024-07-18 23:21:32 +10:00
committed by GitHub
3 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"appName": "prometheus-exporters",
"userGivenName": "prometheus-exporters",
"namespace": "prometheus-exporters",
"destNamespace": "prometheus-exporters",
"destServer": "https://kubernetes.default.svc",
"srcPath": "infrastructures/prometheus-exporters/env/k3s-cluster",
"srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git",
"srcTargetRevision": "",
"labels": null,
"annotations": null
}

View File

@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./node-exporter.yaml

View File

@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-node-exporter
namespace: prometheus
labels:
app: prometheus-node-exporter
spec:
replicas: 4
selector:
matchLabels:
app: prometheus-node-exporter
template:
metadata:
labels:
app: prometheus-node-exporter
spec:
hostNetwork: true
hostPID: true
hostIPC: true
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: prometheus-node-exporter
containers:
- name: prometheus-node-exporter
image: prom/node-exporter
args:
- "--path.rootfs=/host"
volumeMounts:
- name: node-volume
mountPath: /host
readOnly: true
mountPropagation: HostToContainer
securityContext:
privileged: true
volumes:
- name: node-volume
hostPath:
path: /
type: Directory