63 lines
2.1 KiB
YAML
63 lines
2.1 KiB
YAML
{{- if .Values.ndmExporter.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: {{ template "openebs-ndm.node-exporter.fullname" . }}
|
|
labels:
|
|
{{- include "openebs-ndm.node-exporter.labels" . | nindent 4 }}
|
|
spec:
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
selector:
|
|
matchLabels:
|
|
{{- include "openebs-ndm.node-exporter.matchLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "openebs-ndm.node-exporter.labels" . | nindent 8 }}
|
|
{{- with .Values.ndmExporter.nodeExporter.podLabels }}
|
|
{{ toYaml . }}
|
|
{{- end }}
|
|
spec:
|
|
serviceAccountName: {{ template "openebs-ndm.serviceAccountName" . }}
|
|
containers:
|
|
- name: {{ template "openebs-ndm.node-exporter.fullname" . }}
|
|
image: "{{ .Values.ndmExporter.image.registry }}{{ .Values.ndmExporter.image.repository }}:{{ .Values.ndmExporter.image.tag }}"
|
|
command:
|
|
- /usr/local/bin/exporter
|
|
args:
|
|
- "start"
|
|
- "--mode=node"
|
|
- "--port=$(METRICS_LISTEN_PORT)"
|
|
- "--metrics=/metrics"
|
|
ports:
|
|
- containerPort: {{ .Values.ndmExporter.nodeExporter.metricsPort }}
|
|
protocol: TCP
|
|
name: metrics
|
|
imagePullPolicy: {{ .Values.ndmExporter.image.pullPolicy }}
|
|
securityContext:
|
|
privileged: true
|
|
env:
|
|
- name: NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
{{- if .Values.ndmExporter.nodeExporter.metricsPort }}
|
|
- name: METRICS_LISTEN_PORT
|
|
value: :{{ .Values.ndmExporter.nodeExporter.metricsPort }}
|
|
{{- end }}
|
|
{{- if .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.ndmExporter.nodeExporter.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml .Values.ndmExporter.nodeExporter.nodeSelector | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.ndmExporter.nodeExporter.tolerations }}
|
|
tolerations:
|
|
{{ toYaml .Values.ndmExporter.nodeExporter.tolerations | indent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|