Skip to content

Instantly share code, notes, and snippets.

@developer-guy
Created August 30, 2021 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save developer-guy/454cd8d0355e2bc0c17c93ccd88841c9 to your computer and use it in GitHub Desktop.
Save developer-guy/454cd8d0355e2bc0c17c93ccd88841c9 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Secret
metadata:
name: my-webhook-custom-certificate-secret
annotations:
cert-manager.io/allow-direct-injection: "true"
type: kubernetes.io/tls
data:
ca.crt: LS0t....
tls.key: ""
tls.crt: ""
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: my-webhook
annotations:
cert-manager.io/inject-ca-from-secret: default/my-webhook-custom-certificate-secret
webhooks:
- name: app.default.svc
admissionReviewVersions:
- "v1"
sideEffects: None
failurePolicy: Ignore
clientConfig:
service:
name: my-webhook
namespace: default
path: "/mutate"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment