diff --git a/telegraf-ds/templates/daemonset.yaml b/telegraf-ds/templates/daemonset.yaml index 7c5f64c..7289296 100644 --- a/telegraf-ds/templates/daemonset.yaml +++ b/telegraf-ds/templates/daemonset.yaml @@ -53,6 +53,9 @@ spec: mountPath: /var/run/docker.sock - name: config mountPath: /etc/telegraf + {{- if .Values.volumeMounts }} + {{- .Values.volumeMounts | toYaml | trimSuffix "\n" | nindent 8 }} + {{- end }} {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} @@ -73,3 +76,6 @@ spec: - name: config configMap: name: {{ template "fullname" . }} + {{- if .Values.volumes }} + {{- .Values.volumes | toYaml | trimSuffix "\n" | nindent 6 }} + {{- end }} diff --git a/telegraf-ds/values.yaml b/telegraf-ds/values.yaml index 1c50d2b..a407e9c 100644 --- a/telegraf-ds/values.yaml +++ b/telegraf-ds/values.yaml @@ -21,6 +21,17 @@ resources: ## tolerations: [] +## Additional volumeMounts +voumeMounts: [] + # - name: ca-certificates + # configMap: + # name: ca-certificates + +## Additional volumes +volumes: [] + # - name: ca-certificates + # mountPath: /etc/ssl/certs + ## Exposed telegraf configuration ## ref: https://docs.influxdata.com/telegraf/v1.8/administration/configuration/ config: diff --git a/telegraf-s/templates/deployment.yaml b/telegraf-s/templates/deployment.yaml index 57bd8e7..c291ae3 100644 --- a/telegraf-s/templates/deployment.yaml +++ b/telegraf-s/templates/deployment.yaml @@ -29,6 +29,9 @@ spec: - name: varrunutmpro mountPath: /var/run/utmp readOnly: true + {{- if .Values.volumeMounts }} + {{- .Values.volumeMounts | toYaml | trimSuffix "\n" | nindent 8 }} + {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} @@ -54,3 +57,6 @@ spec: - name: config configMap: name: {{ template "fullname" . }} + {{- if .Values.volumes }} + {{- .Values.volumes | toYaml | trimSuffix "\n" | nindent 6 }} + {{- end }} diff --git a/telegraf-s/values.yaml b/telegraf-s/values.yaml index 3d99ec8..f55322a 100644 --- a/telegraf-s/values.yaml +++ b/telegraf-s/values.yaml @@ -33,6 +33,17 @@ nodeSelector: {} ## tolerations: [] +## Additional volumeMounts +voumeMounts: [] + # - name: ca-certificates + # configMap: + # name: ca-certificates + +## Additional volumes +volumes: [] + # - name: ca-certificates + # mountPath: /etc/ssl/certs + ## Affinity for pod assignment ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity ##