Skip to content

Commit

Permalink
Merge pull request #365 from danielvegamyhre/automated-cherry-pick-of…
Browse files Browse the repository at this point in the history
…-#362-upstream-release-0.3

Automated cherry pick of #362: add webhook patches
  • Loading branch information
k8s-ci-robot authored Dec 21, 2023
2 parents 05acd93 + 21b4d32 commit 65abe37
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/components/webhook/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ resources:

configurations:
- kustomizeconfig.yaml

patches:
- path: patches/mutating-patch.yaml
target:
group: admissionregistration.k8s.io
version: v1
kind: MutatingWebhookConfiguration
name: mutating-webhook-configuration
- path: patches/validating-patch.yaml
target:
group: admissionregistration.k8s.io
version: v1
kind: ValidatingWebhookConfiguration
name: validating-webhook-configuration
26 changes: 26 additions & 0 deletions config/components/webhook/patches/mutating-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- op: replace
path: /webhooks/1
value:
admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /mutate--v1-pod
failurePolicy: Fail
name: mpod.kb.io
objectSelector:
matchExpressions:
- key: jobset.sigs.k8s.io/jobset-name
operator: Exists
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- CREATE
resources:
- pods
sideEffects: None
26 changes: 26 additions & 0 deletions config/components/webhook/patches/validating-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- op: replace
path: /webhooks/1
value:
admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate--v1-pod
failurePolicy: Fail
name: vpod.kb.io
objectSelector:
matchExpressions:
- key: jobset.sigs.k8s.io/jobset-name
operator: Exists
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- CREATE
resources:
- pods
sideEffects: None

0 comments on commit 65abe37

Please sign in to comment.