diff --git a/deploy/charts/cert-manager/templates/cainjector-rbac.yaml b/deploy/charts/cert-manager/templates/cainjector-rbac.yaml index aa90ccbf8..6e3ad320b 100644 --- a/deploy/charts/cert-manager/templates/cainjector-rbac.yaml +++ b/deploy/charts/cert-manager/templates/cainjector-rbac.yaml @@ -88,8 +88,7 @@ roleRef: kind: Role name: {{ template "cainjector.fullname" . }}:leaderelection subjects: - - apiGroup: "" - kind: ServiceAccount + - kind: ServiceAccount name: {{ include "cainjector.fullname" . }} namespace: {{ .Release.Namespace }} diff --git a/deploy/charts/cert-manager/templates/deployment.yaml b/deploy/charts/cert-manager/templates/deployment.yaml index 72e34d60b..782fdb679 100644 --- a/deploy/charts/cert-manager/templates/deployment.yaml +++ b/deploy/charts/cert-manager/templates/deployment.yaml @@ -32,11 +32,14 @@ spec: {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | indent 8 }} {{- end }} - annotations: {{- if .Values.podAnnotations }} + annotations: {{ toYaml .Values.podAnnotations | indent 8 }} {{- end }} {{- if and .Values.prometheus.enabled (not .Values.prometheus.servicemonitor.enabled) }} + {{- if not .Values.podAnnotations }} + annotations: + {{- end }} prometheus.io/path: "/metrics" prometheus.io/scrape: 'true' prometheus.io/port: '9402'