Skip to content
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
10 changes: 9 additions & 1 deletion charts/telegraf-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,22 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Define image version
*/}}
{{- define "telegraf-operator.version" -}}
{{- $version := default .Chart.AppVersion .Values.image.tag -}}
{{- printf "%s" $version -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "telegraf-operator.labels" -}}
helm.sh/chart: {{ include "telegraf-operator.chart" . }}
{{ include "telegraf-operator.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/version: {{ include "telegraf-operator.version" . | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
Expand Down
5 changes: 4 additions & 1 deletion charts/telegraf-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spec:
metadata:
labels:
{{- include "telegraf-operator.selectorLabels" . | nindent 8 }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | nindent 8 }}
{{- end }}
{{- if eq .Values.certManager.enable false }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/tls.yml") . | sha256sum }}
Expand All @@ -23,7 +26,7 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
image: "{{ .Values.image.repository }}:{{ include "telegraf-operator.version" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "--telegraf-default-class={{ .Values.classes.default }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/telegraf-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
replicaCount: 3
image:
repository: quay.io/influxdb/telegraf-operator
tag: v1.3.11
pullPolicy: IfNotPresent
sidecarImage: "docker.io/library/telegraf:1.22"

Expand Down Expand Up @@ -52,6 +53,7 @@ sidecarResources:
nodeSelector: {}
tolerations: []
affinity: {}
podLabels: {}
requireAnnotationsForSecret: false
enableDefaultInternalPlugin: true
# allow hot reload ; disabled by default to support versions of telegraf
Expand Down