From a112dd7e86d175f625850f1986ee14e435281aa7 Mon Sep 17 00:00:00 2001 From: Rafael Franzke Date: Wed, 17 May 2023 16:48:16 +0200 Subject: [PATCH] Allow configuration of additional annotations and labels (#9) --- charts/lakom/templates/deployment.yaml | 6 ++++++ charts/lakom/templates/service.yaml | 4 ++++ charts/lakom/values.yaml | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/charts/lakom/templates/deployment.yaml b/charts/lakom/templates/deployment.yaml index 36146c6f..d3853f44 100644 --- a/charts/lakom/templates/deployment.yaml +++ b/charts/lakom/templates/deployment.yaml @@ -13,6 +13,9 @@ metadata: helm.sh/chart: {{ .Values.name }} app.kubernetes.io/instance: {{ .Release.Name }} high-availability-config.resources.gardener.cloud/type: server + {{- if .Values.additionalLabels.deployment }} + {{- toYaml .Values.additionalLabels.deployment | trim | nindent 4 }} + {{- end }} spec: revisionHistoryLimit: 5 replicas: {{ .Values.replicaCount }} @@ -34,6 +37,9 @@ spec: labels: app.kubernetes.io/name: {{ .Values.name }} app.kubernetes.io/instance: {{ .Release.Name }} + {{- if .Values.additionalLabels.deployment }} + {{- toYaml .Values.additionalLabels.deployment | trim | nindent 8 }} + {{- end }} spec: {{- if gt (int .Values.replicaCount) 1 }} affinity: diff --git a/charts/lakom/templates/service.yaml b/charts/lakom/templates/service.yaml index b36bc26b..c35d5ff0 100644 --- a/charts/lakom/templates/service.yaml +++ b/charts/lakom/templates/service.yaml @@ -11,6 +11,10 @@ metadata: labels: app.kubernetes.io/name: {{ .Values.name }} app.kubernetes.io/instance: {{ .Release.Name }} + {{- if .Values.additionalAnnotations.service }} + annotations: + {{- toYaml .Values.additionalAnnotations.service | trim | nindent 4 }} + {{- end }} spec: type: ClusterIP selector: diff --git a/charts/lakom/values.yaml b/charts/lakom/values.yaml index c037c259..42045f43 100644 --- a/charts/lakom/values.yaml +++ b/charts/lakom/values.yaml @@ -58,3 +58,7 @@ vpa: memory: 64Mi updatePolicy: updateMode: "Auto" +additionalAnnotations: + service: {} +additionalLabels: + deployment: {}