Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] node-exporter connector #2964

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/kube-prometheus/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
resources:
- github.com/prometheus-operator/kube-prometheus?ref=v0.9.0
- coredns-prometheusRule.yaml
- node-exporter-connector-daemonset.yaml

patchesStrategicMerge:
- alertmanager-secret.yaml
Expand Down
95 changes: 95 additions & 0 deletions examples/kube-prometheus/node-exporter-connector-daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app.kubernetes.io/name: node-exporter-connector
name: node-exporter-connector
namespace: monitoring
spec:
selector:
matchLabels:
app.kubernetes.io/name: node-exporter-connector
template:
metadata:
labels:
app.kubernetes.io/name: node-exporter-connector
spec:
containers:
- args:
- --logtostderr
- --secure-listen-address=[$(IP)]:19200
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
- --upstream=http:https://[$(IP)]:19100/
env:
- name: IP
valueFrom:
fieldRef:
fieldPath: status.podIP
image: mcr.microsoft.com/oss/kubernetes/kube-rbac-proxy:v0.11.0
name: kube-rbac-proxy
ports:
- containerPort: 19200
name: https
resources:
limits:
cpu: 20m
memory: 40Mi
requests:
cpu: 10m
memory: 20Mi
securityContext:
runAsUser: 65532
hostNetwork: true
nodeSelector:
kubernetes.io/os: linux
serviceAccountName: node-exporter
tolerations:
- operator: Exists
updateStrategy:
rollingUpdate:
maxUnavailable: 10%
type: RollingUpdate
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: node-exporter-connector
name: node-exporter-connector
namespace: monitoring
spec:
clusterIP: None
ports:
- name: https
port: 19100
targetPort: https
selector:
app.kubernetes.io/name: node-exporter-connector
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/name: node-exporter-connector
name: node-exporter-connector
namespace: monitoring
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
honorLabels: true
interval: 30s
port: https
relabelings:
- sourceLabels:
- __metrics_path__
targetLabel: metrics_path
scheme: https
tlsConfig:
insecureSkipVerify: true
jobLabel: app.kubernetes.io/name
namespaceSelector:
matchNames:
- monitoring
selector:
matchLabels:
app.kubernetes.io/name: node-exporter-connector