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/7c70cfa63f5cdeb1c5e53466341d0b9f to your computer and use it in GitHub Desktop.
Save developer-guy/7c70cfa63f5cdeb1c5e53466341d0b9f to your computer and use it in GitHub Desktop.
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: self-signer
namespace: default
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: my-webhook-certificate
namespace: default
spec:
secretName: my-webhook-certificate-secret
dnsNames:
- my-webhook
- my-webhook.default
issuerRef:
name: self-signer
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: my-webhook
annotations:
cert-manager.io/inject-ca-from: default/my-webhook-certificate
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