From f8c83a1411fc522ce59e8088052f0ac79a033a28 Mon Sep 17 00:00:00 2001 From: Nicolas Fischer Date: Tue, 10 Dec 2019 14:11:09 +0000 Subject: [PATCH] issue 2443 - annotations for cert-manager deployments Signed-off-by: Nicolas Fischer --- deploy/charts/cert-manager/README.md | 3 +++ .../cert-manager/templates/cainjector-deployment.yaml | 4 ++++ deploy/charts/cert-manager/templates/deployment.yaml | 4 ++++ .../charts/cert-manager/templates/webhook-deployment.yaml | 4 ++++ deploy/charts/cert-manager/values.yaml | 6 ++++++ 5 files changed, 21 insertions(+) diff --git a/deploy/charts/cert-manager/README.md b/deploy/charts/cert-manager/README.md index 7c051bc51..cc3d832e6 100644 --- a/deploy/charts/cert-manager/README.md +++ b/deploy/charts/cert-manager/README.md @@ -107,6 +107,7 @@ The following table lists the configurable parameters of the cert-manager chart | `prometheus.servicemonitor.labels` | Add custom labels to ServiceMonitor | | | `prometheus.servicemonitor.scrapeTimeout` | Prometheus scrape timeout | `30s` | | `podAnnotations` | Annotations to add to the cert-manager pod | `{}` | +| `deploymentAnnotations` | Annotations to add to the cert-manager deployment | `{}` | | `podDnsPolicy` | Optional cert-manager pod [DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pods-dns-policy) | | | `podDnsConfig` | Optional cert-manager pod [DNS configurations](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pods-dns-config) | | | `podLabels` | Labels to add to the cert-manager pod | `{}` | @@ -116,6 +117,7 @@ The following table lists the configurable parameters of the cert-manager chart | `webhook.enabled` | Toggles whether the validating webhook component should be installed | `true` | | `webhook.replicaCount` | Number of cert-manager webhook replicas | `1` | | `webhook.podAnnotations` | Annotations to add to the webhook pods | `{}` | +| `webhook.deploymentAnnotations` | Annotations to add to the webhook deployment | `{}` | | `webhook.extraArgs` | Optional flags for cert-manager webhook component | `[]` | | `webhook.resources` | CPU/memory resource requests/limits for the webhook pods | `{}` | | `webhook.nodeSelector` | Node labels for webhook pod assignment | `{}` | @@ -130,6 +132,7 @@ The following table lists the configurable parameters of the cert-manager chart | `cainjector.enabled` | Toggles whether the cainjector component should be installed (required for the webhook component to work) | `true` | | `cainjector.replicaCount` | Number of cert-manager cainjector replicas | `1` | | `cainjector.podAnnotations` | Annotations to add to the cainjector pods | `{}` | +| `cainjector.deploymentAnnotations` | Annotations to add to the cainjector deployment | `{}` | | `cainjector.extraArgs` | Optional flags for cert-manager cainjector component | `[]` | | `cainjector.resources` | CPU/memory resource requests/limits for the cainjector pods | `{}` | | `cainjector.nodeSelector` | Node labels for cainjector pod assignment | `{}` | diff --git a/deploy/charts/cert-manager/templates/cainjector-deployment.yaml b/deploy/charts/cert-manager/templates/cainjector-deployment.yaml index c0dcc9ef5..3adafc36a 100644 --- a/deploy/charts/cert-manager/templates/cainjector-deployment.yaml +++ b/deploy/charts/cert-manager/templates/cainjector-deployment.yaml @@ -9,6 +9,10 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "cainjector.chart" . }} + {{- if .Values.cainjector.deploymentAnnotations }} + annotations: +{{ toYaml .Values.cainjector.deploymentAnnotations | indent 4 }} + {{- end }} spec: replicas: {{ .Values.cainjector.replicaCount }} selector: diff --git a/deploy/charts/cert-manager/templates/deployment.yaml b/deploy/charts/cert-manager/templates/deployment.yaml index 782fdb679..bedc2587a 100644 --- a/deploy/charts/cert-manager/templates/deployment.yaml +++ b/deploy/charts/cert-manager/templates/deployment.yaml @@ -9,6 +9,10 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ template "cert-manager.chart" . }} + {{- if .Values.deploymentAnnotations }} + annotations: +{{ toYaml .Values.deploymentAnnotations | indent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} selector: diff --git a/deploy/charts/cert-manager/templates/webhook-deployment.yaml b/deploy/charts/cert-manager/templates/webhook-deployment.yaml index 683d5c808..f904809f7 100644 --- a/deploy/charts/cert-manager/templates/webhook-deployment.yaml +++ b/deploy/charts/cert-manager/templates/webhook-deployment.yaml @@ -10,6 +10,10 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} helm.sh/chart: {{ include "webhook.chart" . }} + {{- if .Values.webhook.deploymentAnnotations }} + annotations: +{{ toYaml .Values.webhook.deploymentAnnotations | indent 4 }} + {{- end }} spec: replicas: {{ .Values.webhook.replicaCount }} selector: diff --git a/deploy/charts/cert-manager/values.yaml b/deploy/charts/cert-manager/values.yaml index 58ac0667a..278673936 100644 --- a/deploy/charts/cert-manager/values.yaml +++ b/deploy/charts/cert-manager/values.yaml @@ -77,6 +77,8 @@ securityContext: fsGroup: 1001 runAsUser: 1001 +deploymentAnnotations: {} + podAnnotations: {} podLabels: {} @@ -148,6 +150,8 @@ webhook: securityContext: {} + deploymentAnnotations: {} + podAnnotations: {} # Optional additional arguments for webhook @@ -196,6 +200,8 @@ cainjector: securityContext: {} + deploymentAnnotations: {} + podAnnotations: {} # Optional additional arguments for cainjector