Skip to content

Instantly share code, notes, and snippets.

@Becram
Last active May 7, 2022 16:10
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 Becram/235cf45ac9f43ec19a6a109d7f477e0a to your computer and use it in GitHub Desktop.
Save Becram/235cf45ac9f43ec19a6a109d7f477e0a to your computer and use it in GitHub Desktop.
k8s-blog-medium-1
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: "kubernetes-webhook.acme.com"
webhooks:
- name: "kubernetes-webhook.acme.com"
objectSelector:
matchLabels:
mutation-check: enabled
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["pods"]
scope: "*"
clientConfig:
service:
namespace: default
name: kubernetes-webhook
path: /mutate-pods
port: 443
caBundle: DEDACTED
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment