Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

telegraf: Allow specifying additional volumes and volumeMounts #110

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions telegraf-ds/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -73,3 +76,6 @@ spec:
- name: config
configMap:
name: {{ template "fullname" . }}
{{- if .Values.volumes }}
{{- .Values.volumes | toYaml | trimSuffix "\n" | nindent 6 }}
{{- end }}
11 changes: 11 additions & 0 deletions telegraf-ds/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions telegraf-s/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -54,3 +57,6 @@ spec:
- name: config
configMap:
name: {{ template "fullname" . }}
{{- if .Values.volumes }}
{{- .Values.volumes | toYaml | trimSuffix "\n" | nindent 6 }}
{{- end }}
11 changes: 11 additions & 0 deletions telegraf-s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
##
Expand Down