diff --git a/contrib/charts/cert-manager/Chart.yaml b/contrib/charts/cert-manager/Chart.yaml index 5ecd68a5f..0d24cbc53 100644 --- a/contrib/charts/cert-manager/Chart.yaml +++ b/contrib/charts/cert-manager/Chart.yaml @@ -1,5 +1,5 @@ name: cert-manager -version: v0.4.0-dev.4 +version: v0.4.0-dev.5 appVersion: v0.4.0-dev.0 description: A Helm chart for cert-manager home: https://github.com/jetstack/cert-manager diff --git a/contrib/charts/cert-manager/README.md b/contrib/charts/cert-manager/README.md index 2bf3758af..23671f193 100644 --- a/contrib/charts/cert-manager/README.md +++ b/contrib/charts/cert-manager/README.md @@ -66,7 +66,7 @@ The following table lists the configurable parameters of the cert-manager chart | `rbac.create` | If `true`, create and use RBAC resources | `true` | | `serviceAccount.create` | If `true`, create a new service account | `true` | | `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | | -| `resources` | CPU/memory resource requests/limits | `requests: {cpu: 10m, memory: 32Mi}` | +| `resources` | CPU/memory resource requests/limits | | | `nodeSelector` | Node labels for pod assignment | `{}` | | `affinity` | Node affinity for pod assignment | `{}` | | `tolerations` | Node tolerations for pod assignment | `[]` | @@ -81,6 +81,14 @@ The following table lists the configurable parameters of the cert-manager chart | `http_proxy` | Value of the `HTTP_PROXY` environment variable in the cert-manager pod | | | `https_proxy` | Value of the `HTTPS_PROXY` environment variable in the cert-manager pod | | | `no_proxy` | Value of the `NO_PROXY` environment variable in the cert-manager pod | | +| `webhook.enabled` | Toggles whether the validating webhook component should be installed | `false` | +| `webhook.replicaCount` | Number of cert-manager webhook replicas | `1` | +| `webhook.podAnnotations` | Annotations to add to the webhook pods | `{}` | +| `webhook.extraArgs` | Optional flags for cert-manager webhook component | `[]` | +| `webhook.resources` | CPU/memory resource requests/limits for the webhook pods | | +| `webhook.image.repository` | Webhook image repository | `quay.io/jetstack/cert-manager-webhook` | +| `webhook.image.tag` | Webhook image tag | `canary` | +| `webhook.image.pullPolicy` | Webhook image pull policy | `Always` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/contrib/charts/cert-manager/requirements.yaml b/contrib/charts/cert-manager/requirements.yaml new file mode 100644 index 000000000..781cbc8b5 --- /dev/null +++ b/contrib/charts/cert-manager/requirements.yaml @@ -0,0 +1,6 @@ +# requirements.yaml +dependencies: +- name: webhook + version: "0.1.0" + repository: "file://webhook" + condition: webhook.enabled diff --git a/contrib/charts/cert-manager/templates/00-namespace.yaml b/contrib/charts/cert-manager/templates/00-namespace.yaml index 72c8a14b8..1502a5997 100644 --- a/contrib/charts/cert-manager/templates/00-namespace.yaml +++ b/contrib/charts/cert-manager/templates/00-namespace.yaml @@ -3,4 +3,7 @@ apiVersion: v1 kind: Namespace metadata: name: {{ .Release.Namespace | quote }} + labels: + name: {{ .Release.Namespace | quote }} + certmanager.k8s.io/disable-validation: "true" {{- end }} diff --git a/contrib/charts/cert-manager/values.yaml b/contrib/charts/cert-manager/values.yaml index 551e7daa7..3ebec3b09 100644 --- a/contrib/charts/cert-manager/values.yaml +++ b/contrib/charts/cert-manager/values.yaml @@ -69,6 +69,9 @@ ingressShim: {} # defaultACMEChallengeType: "" # defaultACMEDNS01ChallengeProvider: "" +webhook: + enabled: false + # This is used by the static manifest generator in order to create a static # namespace manifest for the namespace that cert-manager is being installed # within. It should **not** be used if you are using Helm for deployment. diff --git a/contrib/charts/cert-manager/webhook/.helmignore b/contrib/charts/cert-manager/webhook/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/contrib/charts/cert-manager/webhook/Chart.yaml b/contrib/charts/cert-manager/webhook/Chart.yaml new file mode 100644 index 000000000..cdebbdfac --- /dev/null +++ b/contrib/charts/cert-manager/webhook/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: webhook +version: 0.1.0 diff --git a/contrib/charts/cert-manager/webhook/templates/NOTES.txt b/contrib/charts/cert-manager/webhook/templates/NOTES.txt new file mode 100644 index 000000000..e69de29bb diff --git a/contrib/charts/cert-manager/webhook/templates/_helpers.tpl b/contrib/charts/cert-manager/webhook/templates/_helpers.tpl new file mode 100644 index 000000000..c72a43690 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/_helpers.tpl @@ -0,0 +1,48 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "webhook.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "webhook.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "webhook.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "webhook.selfSignedIssuer" -}} +{{ printf "%s-selfsign" (include "webhook.fullname" .) }} +{{- end -}} + +{{- define "webhook.rootCAIssuer" -}} +{{ printf "%s-ca" (include "webhook.fullname" .) }} +{{- end -}} + +{{- define "webhook.rootCACertificate" -}} +{{ printf "%s-ca" (include "webhook.fullname" .) }} +{{- end -}} + +{{- define "webhook.servingCertificate" -}} +{{ printf "%s-webhook-tls" (include "webhook.fullname" .) }} +{{- end -}} diff --git a/contrib/charts/cert-manager/webhook/templates/apiservice.yaml b/contrib/charts/cert-manager/webhook/templates/apiservice.yaml new file mode 100644 index 000000000..2028bc2d1 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/apiservice.yaml @@ -0,0 +1,17 @@ +apiVersion: apiregistration.k8s.io/v1beta1 +kind: APIService +metadata: + name: v1beta1.admission.certmanager.k8s.io + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + group: admission.certmanager.k8s.io + groupPriorityMinimum: 1000 + versionPriority: 15 + service: + name: {{ include "webhook.fullname" . }} + namespace: "{{ .Release.Namespace }}" + version: v1beta1 diff --git a/contrib/charts/cert-manager/webhook/templates/ca-sync.yaml b/contrib/charts/cert-manager/webhook/templates/ca-sync.yaml new file mode 100644 index 000000000..a08e79955 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/ca-sync.yaml @@ -0,0 +1,172 @@ +## This file contains a CronJob that runs every 24h to automatically update the +## caBundle set on the APIService and ValidatingWebhookConfiguration resource. +## This allows us to store the CA bundle in a Secret resource which is +## generated by cert-manager's 'selfsigned' Issuer. +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: {{ include "webhook.fullname" . }}-ca-sync + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + schedule: "* * */24 * *" + jobTemplate: + spec: + template: + metadata: + labels: + app: ca-helper + spec: + serviceAccountName: {{ include "webhook.fullname" . }}-ca-sync + restartPolicy: OnFailure + containers: + - name: ca-helper + image: quay.io/munnerz/apiextensions-ca-helper:canary + imagePullPolicy: IfNotPresent + args: + - -config=/config/config + volumeMounts: + - name: config + mountPath: /config + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + volumes: + - name: config + configMap: + name: {{ include "webhook.fullname" . }}-ca-sync +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "webhook.fullname" . }}-ca-sync + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + template: + metadata: + labels: + app: ca-helper + spec: + serviceAccountName: {{ include "webhook.fullname" . }}-ca-sync + restartPolicy: OnFailure + containers: + - name: ca-helper + image: quay.io/munnerz/apiextensions-ca-helper:canary + imagePullPolicy: IfNotPresent + args: + - -config=/config/config + volumeMounts: + - name: config + mountPath: /config + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + volumes: + - name: config + configMap: + name: {{ include "webhook.fullname" . }}-ca-sync +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "webhook.fullname" . }}-ca-sync + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + config: |- + { + "apiServices": [ + { + "name": "v1beta1.admission.certmanager.k8s.io", + "secret": { + "name": "{{ include "webhook.rootCACertificate" . }}", + "namespace": "{{ .Release.Namespace }}", + "key": "tls.crt" + } + } + ], + "validatingWebhookConfigurations": [ + { + "name": "{{ include "webhook.fullname" . }}", + "file": { + "path": "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + } + } + ] + } +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "webhook.fullname" . }}-ca-sync + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: {{ include "webhook.fullname" . }}-ca-sync + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +rules: + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get"] + resourceNames: + - {{ include "webhook.rootCACertificate" . }} + - apiGroups: ["admissionregistration.k8s.io"] + resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"] + verbs: ["get", "update"] + resourceNames: + - {{ include "webhook.fullname" . }} + - apiGroups: ["apiregistration.k8s.io"] + resources: ["apiservices"] + verbs: ["get", "update"] + resourceNames: + - v1beta1.admission.certmanager.k8s.io +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: {{ include "webhook.fullname" . }}-ca-sync + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "webhook.fullname" . }}-ca-sync +subjects: + - name: {{ include "webhook.fullname" . }}-ca-sync + namespace: {{ .Release.Namespace }} + kind: ServiceAccount diff --git a/contrib/charts/cert-manager/webhook/templates/deployment.yaml b/contrib/charts/cert-manager/webhook/templates/deployment.yaml new file mode 100644 index 000000000..e81ed606b --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/deployment.yaml @@ -0,0 +1,65 @@ +apiVersion: apps/v1beta1 +kind: Deployment +metadata: + name: {{ include "webhook.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "webhook.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "webhook.name" . }} + release: {{ .Release.Name }} + annotations: + {{- if .Values.podAnnotations }} +{{ toYaml .Values.podAnnotations | indent 8 }} + {{- end }} + spec: + serviceAccountName: {{ include "webhook.fullname" . }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - --v=12 + - --tls-cert-file=/certs/tls.crt + - --tls-private-key-file=/certs/tls.key + - --disable-admission-plugins=NamespaceLifecycle,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,Initializers + {{- if .Values.extraArgs }} +{{ toYaml .Values.extraArgs | indent 10 }} + {{- end }} + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + resources: +{{ toYaml .Values.resources | indent 12 }} + volumeMounts: + - name: certs + mountPath: /certs + volumes: + - name: certs + secret: + secretName: {{ include "webhook.servingCertificate" . }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/contrib/charts/cert-manager/webhook/templates/pki.yaml b/contrib/charts/cert-manager/webhook/templates/pki.yaml new file mode 100644 index 000000000..1654b29b5 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/pki.yaml @@ -0,0 +1,74 @@ +--- +# Create a selfsigned Issuer, in order to create a root CA certificate for +# signing webhook serving certificates +apiVersion: certmanager.k8s.io/v1alpha1 +kind: Issuer +metadata: + name: {{ include "webhook.selfSignedIssuer" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selfsigned: {} + +--- + +# Generate a CA Certificate used to sign certificates for the webhook +apiVersion: certmanager.k8s.io/v1alpha1 +kind: Certificate +metadata: + name: {{ include "webhook.rootCACertificate" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + secretName: {{ include "webhook.rootCACertificate" . }} + issuerRef: + name: {{ include "webhook.selfSignedIssuer" . }} + commonName: "ca.webhook.cert-manager" + isCA: true + +--- + +# Create an Issuer that uses the above generated CA certificate to issue certs +apiVersion: certmanager.k8s.io/v1alpha1 +kind: Issuer +metadata: + name: {{ include "webhook.rootCAIssuer" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + ca: + secretName: {{ include "webhook.rootCACertificate" . }} + +--- + +# Finally, generate a serving certificate for the webhook to use +apiVersion: certmanager.k8s.io/v1alpha1 +kind: Certificate +metadata: + name: {{ include "webhook.servingCertificate" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + secretName: {{ include "webhook.servingCertificate" . }} + issuerRef: + name: {{ include "webhook.rootCAIssuer" . }} + dnsNames: + - {{ include "webhook.fullname" . }} + - {{ include "webhook.fullname" . }}.{{ .Release.Namespace }} + - {{ include "webhook.fullname" . }}.{{ .Release.Namespace }}.svc diff --git a/contrib/charts/cert-manager/webhook/templates/rbac.yaml b/contrib/charts/cert-manager/webhook/templates/rbac.yaml new file mode 100644 index 000000000..5854af581 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/rbac.yaml @@ -0,0 +1,68 @@ +### Webhook ### +--- +# apiserver gets the auth-delegator role to delegate auth decisions to +# the core apiserver +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: {{ include "webhook.fullname" . }}:auth-delegator + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: system:auth-delegator +subjects: +- apiGroup: "" + kind: ServiceAccount + name: {{ include "webhook.fullname" . }} + namespace: {{ .Release.Namespace }} + +--- + +# apiserver gets the ability to read authentication. This allows it to +# read the specific configmap that has the requestheader-* entries to +# api agg +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: {{ include "webhook.fullname" . }}:webhook-authentication-reader + namespace: kube-system + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: extension-apiserver-authentication-reader +subjects: +- apiGroup: "" + kind: ServiceAccount + name: {{ include "webhook.fullname" . }} + namespace: {{ .Release.Namespace }} + +--- + +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "webhook.fullname" . }}:webhook-requester + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +rules: +- apiGroups: + - admission.certmanager.k8s.io + resources: + - certificates + - issuers + - clusterissuers + verbs: + - create diff --git a/contrib/charts/cert-manager/webhook/templates/service.yaml b/contrib/charts/cert-manager/webhook/templates/service.yaml new file mode 100644 index 000000000..88c487cc1 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "webhook.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: ClusterIP + ports: + - name: https + port: 443 + targetPort: 443 + selector: + app: {{ include "webhook.name" . }} + release: {{ .Release.Name }} diff --git a/contrib/charts/cert-manager/webhook/templates/serviceaccount.yaml b/contrib/charts/cert-manager/webhook/templates/serviceaccount.yaml new file mode 100644 index 000000000..54dc9ba13 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/serviceaccount.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "webhook.fullname" . }} + namespace: {{ .Release.Namespace | quote }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} diff --git a/contrib/charts/cert-manager/webhook/templates/validating-webhook.yaml b/contrib/charts/cert-manager/webhook/templates/validating-webhook.yaml new file mode 100644 index 000000000..25112194c --- /dev/null +++ b/contrib/charts/cert-manager/webhook/templates/validating-webhook.yaml @@ -0,0 +1,91 @@ +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: ValidatingWebhookConfiguration +metadata: + name: {{ include "webhook.fullname" . }} + labels: + app: {{ include "webhook.name" . }} + chart: {{ include "webhook.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +webhooks: + - name: certificates.admission.certmanager.k8s.io + namespaceSelector: + matchExpressions: + - key: "certmanager.k8s.io/disable-validation" + operator: "NotIn" + values: + - "true" + - key: "name" + operator: "NotIn" + values: + - {{ .Release.Namespace }} + rules: + - apiGroups: + - "certmanager.k8s.io" + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - certificates + failurePolicy: Fail + clientConfig: + service: + name: kubernetes + namespace: default + path: /apis/admission.certmanager.k8s.io/v1beta1/certificates + - name: issuers.admission.certmanager.k8s.io + namespaceSelector: + matchExpressions: + - key: "certmanager.k8s.io/disable-validation" + operator: "NotIn" + values: + - "true" + - key: "name" + operator: "NotIn" + values: + - {{ .Release.Namespace }} + rules: + - apiGroups: + - "certmanager.k8s.io" + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - issuers + failurePolicy: Fail + clientConfig: + service: + name: kubernetes + namespace: default + path: /apis/admission.certmanager.k8s.io/v1beta1/issuers + - name: clusterissuers.admission.certmanager.k8s.io + namespaceSelector: + matchExpressions: + - key: "certmanager.k8s.io/disable-validation" + operator: "NotIn" + values: + - "true" + - key: "name" + operator: "NotIn" + values: + - {{ .Release.Namespace }} + rules: + - apiGroups: + - "certmanager.k8s.io" + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - clusterissuers + failurePolicy: Fail + clientConfig: + service: + name: kubernetes + namespace: default + path: /apis/admission.certmanager.k8s.io/v1beta1/clusterissuers diff --git a/contrib/charts/cert-manager/webhook/values.yaml b/contrib/charts/cert-manager/webhook/values.yaml new file mode 100644 index 000000000..a7909d125 --- /dev/null +++ b/contrib/charts/cert-manager/webhook/values.yaml @@ -0,0 +1,16 @@ +replicaCount: 1 + +podAnnotations: {} + +# Optional additional arguments for webhook +extraArgs: [] + +resources: {} + # requests: + # cpu: 10m + # memory: 32Mi + +image: + repository: quay.io/jetstack/cert-manager-webhook + tag: canary + pullPolicy: Always