Commit 6f68a67f authored by David McKay's avatar David McKay

feat: add ability to provide volumes and mountPoints

parent e020a4b4
apiVersion: v1 apiVersion: v1
name: telegraf name: telegraf
version: 1.7.13 version: 1.7.14
appVersion: 1.14 appVersion: 1.14
deprecated: false deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics. description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
......
...@@ -35,10 +35,13 @@ spec: ...@@ -35,10 +35,13 @@ spec:
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: /etc/telegraf mountPath: /etc/telegraf
{{- range .Values.volumeMounts}} {{- range .Values.volumeMounts }}
- name: {{ .name }} - name: {{ .name }}
mountPath: {{ .mountPath }} mountPath: {{ .mountPath }}
{{- end }} {{- end }}
{{- if .Values.mountPoints }}
{{ toYaml .Values.mountPoints | indent 8 }}
{{- end }}
{{- if .Values.hooks }} {{- if .Values.hooks }}
{{- if or (.Values.hooks.postStart) (.Values.hooks.preStop) }} {{- if or (.Values.hooks.postStart) (.Values.hooks.preStop) }}
lifecycle: lifecycle:
...@@ -87,6 +90,6 @@ spec: ...@@ -87,6 +90,6 @@ spec:
- name: config - name: config
configMap: configMap:
name: {{ include "telegraf.fullname" . }} name: {{ include "telegraf.fullname" . }}
{{- if .Values.volumeMounts }} {{- if .Values.volumes }}
{{ toYaml .Values.volumeMounts | indent 6 }} {{ toYaml .Values.volumes | indent 6 }}
{{- end}} {{- end }}
...@@ -17,6 +17,19 @@ env: ...@@ -17,6 +17,19 @@ env:
- name: HOSTNAME - name: HOSTNAME
value: "telegraf-polling-service" value: "telegraf-polling-service"
# An older "volumeMounts" key was previously added which will likely
# NOT WORK as you expect. Please use this newer configuration.
# volumes:
# - name: telegraf-output-influxdb2
# configMap:
# name: "telegraf-output-influxdb2"
# mountPoints:
# - name: telegraf-output-influxdb2
# mountPath: /etc/telegraf/conf.d
# subPath: influxdb2.conf
## Configure resource requests and limits ## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
resources: {} resources: {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment