diff --git a/config/charts/knative-operator/templates/operator.yaml b/config/charts/knative-operator/templates/operator.yaml index b539c76b9..fd74b6616 100644 --- a/config/charts/knative-operator/templates/operator.yaml +++ b/config/charts/knative-operator/templates/operator.yaml @@ -61,16 +61,15 @@ spec: metadata: annotations: sidecar.istio.io/inject: "false" + {{- if and .Values.knative_operator.operator_webhook.podAnnotations }} + {{ toYaml .Values.knative_operator.operator_webhook.podAnnotations }} + {{- end }} labels: app: operator-webhook role: operator-webhook app.kubernetes.io/component: operator-webhook app.kubernetes.io/version: "{{ .Chart.Version }}" app.kubernetes.io/name: knative-operator - {{- if and .Values.knative_operator.operator_webhook.podAnnotations }} - annotations: - {{ toYaml .Values.knative_operator.operator_webhook.podAnnotations }} - {{- end }} spec: # To avoid node becoming SPOF, spread our replicas to different nodes. affinity: @@ -6316,14 +6315,13 @@ spec: metadata: annotations: sidecar.istio.io/inject: "false" + {{- if and .Values.knative_operator.knative_operator.podAnnotations }} + {{ toYaml .Values.knative_operator.knative_operator.podAnnotations }} + {{- end }} labels: name: knative-operator app.kubernetes.io/name: knative-operator app.kubernetes.io/version: "{{ .Chart.Version }}" - {{- if and .Values.knative_operator.knative_operator.podAnnotations }} - annotations: - {{ toYaml .Values.knative_operator.knative_operator.podAnnotations }} - {{- end }} spec: serviceAccountName: knative-operator {{- if and .Values.knative_operator.knative_operator.securityContext }}