Skip to content

Commit 2936ea7

Browse files
authored
[stable/ndm]: add node selector and toleration to ndm exporter (#668)
* [stable/ndm]: add node selector and toleration to ndm exporter - add toleration and node selector for NDM exporter pods - update chart version - update values.yaml - update README Signed-off-by: Akhil Mohan <akhil.mohan@datacore.com>
1 parent 9f40337 commit 2936ea7

File tree

7 files changed

+103
-70
lines changed

7 files changed

+103
-70
lines changed

deploy/helm/charts/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: openebs-ndm
33
description: Helm chart for OpenEBS Node Disk Manager - a Kubernetes native storage device management solution. For instructions on how to install, refer to https://openebs.github.io/node-disk-manager/.
4-
version: 1.8.0
4+
version: 1.8.1
55
appVersion: 1.8.0
66
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png
77
home: http://www.openebs.io/

deploy/helm/charts/README.md

Lines changed: 67 additions & 63 deletions
Large diffs are not rendered by default.

deploy/helm/charts/templates/cluster-exporter.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,16 @@ spec:
4545
- name: METRICS_LISTEN_PORT
4646
value: :{{ .Values.ndmExporter.clusterExporter.metricsPort }}
4747
{{- end }}
48-
{{- end }}
48+
{{- if .Values.imagePullSecrets }}
49+
imagePullSecrets:
50+
{{ toYaml .Values.imagePullSecrets | indent 8 }}
51+
{{- end }}
52+
{{- if .Values.ndmExporter.clusterExporter.nodeSelector }}
53+
nodeSelector:
54+
{{ toYaml .Values.ndmExporter.clusterExporter.nodeSelector | indent 8 }}
55+
{{- end }}
56+
{{- if .Values.ndmExporter.clusterExporter.tolerations }}
57+
tolerations:
58+
{{ toYaml .Values.ndmExporter.clusterExporter.tolerations | indent 8 }}
59+
{{- end }}
60+
{{- end }}

deploy/helm/charts/templates/daemonset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ spec:
159159
# kubectl label node <node-name> "openebs.io/nodegroup"="storage-node"
160160
#nodeSelector:
161161
# "openebs.io/nodegroup": "storage-node"
162-
{{- with .Values.imagePullSecrets }}
162+
{{- if .Values.imagePullSecrets }}
163163
imagePullSecrets:
164-
{{- toYaml . | nindent 6 }}
164+
{{ toYaml .Values.imagePullSecrets | indent 8 }}
165165
{{- end }}
166166
{{- if .Values.ndm.nodeSelector }}
167167
nodeSelector:

deploy/helm/charts/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ spec:
6868
- name: OPENEBS_IO_IMAGE_PULL_SECRETS
6969
value: "{{- range $index, $secret := .Values.imagePullSecrets}}{{if $index}},{{end}}{{ $secret.name }}{{- end}}"
7070
{{- end }}
71-
{{- with .Values.imagePullSecrets }}
71+
{{- if .Values.imagePullSecrets }}
7272
imagePullSecrets:
73-
{{- toYaml . | nindent 6 }}
73+
{{ toYaml .Values.imagePullSecrets | indent 8 }}
7474
{{- end }}
7575
{{- if .Values.ndmOperator.nodeSelector }}
7676
nodeSelector:

deploy/helm/charts/templates/node-exporter.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,17 @@ spec:
4646
- name: METRICS_LISTEN_PORT
4747
value: :{{ .Values.ndmExporter.nodeExporter.metricsPort }}
4848
{{- end }}
49-
{{- end }}
49+
{{- if .Values.imagePullSecrets }}
50+
imagePullSecrets:
51+
{{ toYaml .Values.imagePullSecrets | indent 8 }}
52+
{{- end }}
53+
{{- if .Values.ndmExporter.nodeExporter.nodeSelector }}
54+
nodeSelector:
55+
{{ toYaml .Values.ndmExporter.nodeExporter.nodeSelector | indent 8 }}
56+
{{- end }}
57+
{{- if .Values.ndmExporter.nodeExporter.tolerations }}
58+
tolerations:
59+
{{ toYaml .Values.ndmExporter.nodeExporter.tolerations | indent 8 }}
60+
{{- end }}
61+
{{- end }}
62+

deploy/helm/charts/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ ndmExporter:
100100
# If not set, service will not be created to expose metrics endpoint to serviceMonitor
101101
# and listen-port flag will not be set and container port will be empty.
102102
metricsPort: 9101
103+
nodeSelector: {}
104+
tolerations: []
103105
clusterExporter:
104106
name: cluster-exporter
105107
podLabels:
@@ -108,6 +110,8 @@ ndmExporter:
108110
# If not set, service will not be created to expose metrics endpoint to serviceMonitor
109111
# and listen-port flag will not be set and container port will be empty.
110112
metricsPort: 9100
113+
nodeSelector: {}
114+
tolerations: []
111115

112116
helperPod:
113117
image:

0 commit comments

Comments
 (0)