Skip to content

Commit

Permalink
[stable/ndm]: add node selector and toleration to ndm exporter (#668)
Browse files Browse the repository at this point in the history
* [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 <[email protected]>
  • Loading branch information
akhilerm authored Apr 11, 2022
1 parent 9f40337 commit 2936ea7
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 70 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: openebs-ndm
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/.
version: 1.8.0
version: 1.8.1
appVersion: 1.8.0
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png
home: http://www.openebs.io/
Expand Down
130 changes: 67 additions & 63 deletions deploy/helm/charts/README.md

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion deploy/helm/charts/templates/cluster-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,16 @@ spec:
- name: METRICS_LISTEN_PORT
value: :{{ .Values.ndmExporter.clusterExporter.metricsPort }}
{{- end }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- if .Values.ndmExporter.clusterExporter.nodeSelector }}
nodeSelector:
{{ toYaml .Values.ndmExporter.clusterExporter.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.ndmExporter.clusterExporter.tolerations }}
tolerations:
{{ toYaml .Values.ndmExporter.clusterExporter.tolerations | indent 8 }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions deploy/helm/charts/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ spec:
# kubectl label node <node-name> "openebs.io/nodegroup"="storage-node"
#nodeSelector:
# "openebs.io/nodegroup": "storage-node"
{{- with .Values.imagePullSecrets }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- if .Values.ndm.nodeSelector }}
nodeSelector:
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ spec:
- name: OPENEBS_IO_IMAGE_PULL_SECRETS
value: "{{- range $index, $secret := .Values.imagePullSecrets}}{{if $index}},{{end}}{{ $secret.name }}{{- end}}"
{{- end }}
{{- with .Values.imagePullSecrets }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- if .Values.ndmOperator.nodeSelector }}
nodeSelector:
Expand Down
15 changes: 14 additions & 1 deletion deploy/helm/charts/templates/node-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,17 @@ spec:
- name: METRICS_LISTEN_PORT
value: :{{ .Values.ndmExporter.nodeExporter.metricsPort }}
{{- end }}
{{- 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 }}

4 changes: 4 additions & 0 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ ndmExporter:
# If not set, service will not be created to expose metrics endpoint to serviceMonitor
# and listen-port flag will not be set and container port will be empty.
metricsPort: 9101
nodeSelector: {}
tolerations: []
clusterExporter:
name: cluster-exporter
podLabels:
Expand All @@ -108,6 +110,8 @@ ndmExporter:
# If not set, service will not be created to expose metrics endpoint to serviceMonitor
# and listen-port flag will not be set and container port will be empty.
metricsPort: 9100
nodeSelector: {}
tolerations: []

helperPod:
image:
Expand Down

0 comments on commit 2936ea7

Please sign in to comment.