diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 4de4a0d..0ea49de 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -5,6 +5,10 @@ metadata: name: {{ include "image-mapper.fullname" . }} labels: {{- include "image-mapper.labels" . | nindent 4 }} + {{- with .Values.deploymentAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} selector: diff --git a/chart/templates/webhook.yaml b/chart/templates/webhook.yaml index e6876c2..d3409f9 100644 --- a/chart/templates/webhook.yaml +++ b/chart/templates/webhook.yaml @@ -37,6 +37,17 @@ spec: name: {{ include "image-mapper.fullname" . }} {{- end }} secretName: {{ include "image-mapper.fullname" . }}-tls-managed + {{- if or (and .Values.secretLabels (keys .Values.secretLabels)) (and .Values.secretAnnotations (keys .Values.secretAnnotations)) }} + secretTemplate: + {{- with .Values.secretAnnotations }} + annotations: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.secretLabels }} + labels: + {{- toYaml . | nindent 6 }} + {{- end }} + {{- end }} {{- else }} --- apiVersion: v1 @@ -45,6 +56,13 @@ metadata: name: {{ include "image-mapper.fullname" . }}-tls labels: {{- include "image-mapper.labels" . | nindent 4 }} + {{- with .Values.secretLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.secretAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} type: Opaque data: {{- $data := (lookup "v1" "Secret" .Release.Namespace (printf "%s-tls" (include "image-mapper.fullname" .))).data }} diff --git a/chart/values.yaml b/chart/values.yaml index b3b56fc..b2f0b14 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -34,6 +34,12 @@ podSecurityContext: {} podAnnotations: {} # -- Additional pod labels podLabels: {} +# -- Additional deployment annotations +deploymentAnnotations: {} +# -- Certificate secret annotations +secretAnnotations: {} +# -- Certificate secret labels +secretLabels: {} # -- Container security context securityContext: {} resources: