inveniosoftware / helm-invenio

Helm charts for deploying an Invenio instance
https://helm-invenio.readthedocs.io
7 stars 19 forks source link

Extension points for custom labels and annotations in each resource #115

Open jaolwi opened 6 months ago

jaolwi commented 6 months ago

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 }}