From 0f60bb2dab068c28d9817dfebb60d052a15ed2a5 Mon Sep 17 00:00:00 2001 From: Bernhard Mallinger Date: Mon, 27 Jan 2025 09:17:03 +0100 Subject: [PATCH] Allow setting annotations for deployments This change basically forwards `raster-eoapi.annotations` to the annotations of the respective deployment. There are no official guidelines on key structuring, but this follows conventions set by other large charts like [1] where properties on the top level object are forwarded to the central kubernetes object, in this case the deployment. Other objects could still be customized with sub-keys, e.g. `raster-eoapi.service.annotations` could be applied to the respective kubernetes service. The values currently also contain a `settings` key. Since properties like `image` or `command` are configured directly in `raster-eoapi`, I've also placed the annotations directly here. However they could also be moved to `settings`. [1] https://artifacthub.io/packages/helm/grafana/grafana --- helm-chart/eoapi/templates/services/deployment.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm-chart/eoapi/templates/services/deployment.yaml b/helm-chart/eoapi/templates/services/deployment.yaml index c3c0d3ce..8c38fbe4 100644 --- a/helm-chart/eoapi/templates/services/deployment.yaml +++ b/helm-chart/eoapi/templates/services/deployment.yaml @@ -9,6 +9,10 @@ metadata: app: {{ $serviceName }}-{{ $.Release.Name }} gitsha: {{ $.Values.gitSha }} name: {{ $serviceName }}-{{ $.Release.Name }} + {{- with index $v "annotations" }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: progressDeadlineSeconds: 600 revisionHistoryLimit: 5