Skip to content

Conversation

@emagiz
Copy link
Contributor

@emagiz emagiz commented Jul 16, 2025

This PR add a value to the values file which allows setting pod annotations. This is enables the usage of a fundamental object in the k8s spec

@OmarGadd
Copy link

This PR fixes #184

@OmarGadd
Copy link

@samdulam Is there anyone who can review this?

{{- include "portainer.selectorLabels" . | nindent 8 }}
annotations:
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}

Choose a reason for hiding this comment

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

Suggested change
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- tpl (toYaml .Values.podAnnotations) . | nindent 8 }}

This allow dynamic values in podAnnotations. Use case example https://stackoverflow.com/questions/69371607/helm-add-checksum-annotation-from-values

This approach is used in many popular charts, e.g.

@emagiz

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.

3 participants