Skip to content

[Telegraf] Add initContainers to helm chart#724

Closed
fgeck wants to merge 1 commit intoinfluxdata:masterfrom
fgeck:initContainersTelegraf
Closed

[Telegraf] Add initContainers to helm chart#724
fgeck wants to merge 1 commit intoinfluxdata:masterfrom
fgeck:initContainersTelegraf

Conversation

@fgeck
Copy link

@fgeck fgeck commented Jul 2, 2025

I need an initContainer to configure my postgres database during startup before running telegraf.
The content is a copy of #347
closes #395

Copy link
Contributor

@skartikey skartikey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chart's README.md should be updated to document this new initContainers option.

{{ toYaml .Values.securityContext | indent 8 }}
{{- end }}
serviceAccountName: {{ template "telegraf.serviceAccountName" . }}
{{- with.Values.initContainers }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space between with and .Values. This will cause a template parsing error. Should be:

Suggested change
{{- with.Values.initContainers }}
{{- with .Values.initContainers }}

Comment on lines +38 to +39
# - name: ubuntu
# image: ubuntu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a more practical example showing common use cases:

Suggested change
# - name: ubuntu
# image: ubuntu
# - name: init-db
# image: busybox:1.36
# command: ['sh', '-c', 'echo "Initializing..."']

@fgeck fgeck closed this by deleting the head repository Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running properly SNMP on Telegraf requires pulling snmp-mibs-downloader package

2 participants