Last active
November 29, 2022 10:13
-
-
Save mohllal/6e091091d2eb6d47ce64c5bdb1f3a7c1 to your computer and use it in GitHub Desktop.
An example of Kubernetes MutatingWebhookConfiguration for the admission controller webhook server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: admissionregistration.k8s.io/v1 | |
kind: MutatingWebhookConfiguration | |
metadata: | |
name: kubernetes-sidecar-injector | |
webhooks: | |
- name: kubernetes-sidecar-injector.default.svc | |
admissionReviewVersions: | |
- v1 | |
sideEffects: "NoneOnDryRun" | |
reinvocationPolicy: "Never" | |
timeoutSeconds: 10 | |
objectSelector: | |
matchExpressions: | |
- key: sidecar.me/inject | |
operator: In | |
values: | |
- "True" | |
- "true" | |
rules: | |
- apiGroups: | |
- "" | |
apiVersions: | |
- v1 | |
operations: | |
- CREATE | |
resources: | |
- pods | |
scope: '*' | |
clientConfig: | |
service: | |
namespace: default | |
name: kubernetes-sidecar-injector | |
path: "/mutation/pod" | |
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment