From 45a54c78d835c0a4b2f653f9907b0b670220c151 Mon Sep 17 00:00:00 2001 From: aaronschweig Date: Tue, 19 Nov 2024 16:13:19 +0100 Subject: [PATCH] fix: annotations in the wrong place --- charts/account-operator/templates/deployment.yaml | 6 +++--- .../tests/__snapshot__/deployment_test.yaml.snap | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/charts/account-operator/templates/deployment.yaml b/charts/account-operator/templates/deployment.yaml index 22b3c1243..6b694487f 100644 --- a/charts/account-operator/templates/deployment.yaml +++ b/charts/account-operator/templates/deployment.yaml @@ -6,7 +6,6 @@ metadata: {{- if .Values.webhooks.enabled }} annotations: cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "entity.name" . }}-serving-cert - traffic.sidecar.istio.io/excludeInboundPorts: "9443" {{- end }} spec: revisionHistoryLimit: {{ .Values.deployment.revisionHistoryLimit }} @@ -21,12 +20,13 @@ spec: {{- with .Values.deployment.specTemplate.labels }} {{- toYaml . | nindent 8 }} {{- end }} - {{ if .Values.deployment.specTemplate.annotations }} annotations: {{- with .Values.deployment.specTemplate.annotations }} {{- toYaml . | nindent 8 }} {{- end }} - {{- end }} + {{- if .Values.webhooks.enabled }} + traffic.sidecar.istio.io/excludeInboundPorts: "9443" + {{- end }} spec: serviceAccountName: {{ include "entity.name" . }} containers: diff --git a/charts/account-operator/tests/__snapshot__/deployment_test.yaml.snap b/charts/account-operator/tests/__snapshot__/deployment_test.yaml.snap index 3175f57a0..8d939d4f8 100644 --- a/charts/account-operator/tests/__snapshot__/deployment_test.yaml.snap +++ b/charts/account-operator/tests/__snapshot__/deployment_test.yaml.snap @@ -285,6 +285,7 @@ operator match the snapshot: service: RELEASE-NAME-account-operator template: metadata: + annotations: null labels: control-plane: controller-manager service: RELEASE-NAME-account-operator @@ -651,6 +652,7 @@ operator match the snapshot (with kubeconfigSecret): service: RELEASE-NAME-account-operator template: metadata: + annotations: null labels: control-plane: controller-manager service: RELEASE-NAME-account-operator @@ -1017,7 +1019,6 @@ operator match the snapshot with webhook enabled: metadata: annotations: cert-manager.io/inject-ca-from: NAMESPACE/RELEASE-NAME-account-operator-serving-cert - traffic.sidecar.istio.io/excludeInboundPorts: "9443" name: RELEASE-NAME-account-operator namespace: NAMESPACE spec: @@ -1027,6 +1028,8 @@ operator match the snapshot with webhook enabled: service: RELEASE-NAME-account-operator template: metadata: + annotations: + traffic.sidecar.istio.io/excludeInboundPorts: "9443" labels: control-plane: controller-manager service: RELEASE-NAME-account-operator