To make the chart as customizable as possible for users, it would be good to create entrypoints in all resources for labels and annotations. Annotations and labels are often used by clusters to implement network rules or to inject sidecars.
Possible solution:
There are examples in the postgresql charts from Bitnami.
The best way to implement this is probably to use the "with" statement.
#values.yaml
web:
extraLabels: {}
extraAnnotations: {}
#web-deploy.yaml
labels:
{{- with .Values.web.extraLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- with .Values.web.extraAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
To make the chart as customizable as possible for users, it would be good to create entrypoints in all resources for labels and annotations. Annotations and labels are often used by clusters to implement network rules or to inject sidecars.
Possible solution:
There are examples in the postgresql charts from Bitnami. The best way to implement this is probably to use the "with" statement.