Skip to content

Commit 4d6e9b6

Browse files
chore: Add pods/resize subresource to mutating and validating webhooks (#3778)
Signed-off-by: Ian Stanton <ian@stanton.sh> Co-authored-by: Jaydip Gabani <gabanijaydip@gmail.com>
1 parent a4a8504 commit 4d6e9b6

File tree

6 files changed

+7
-1
lines changed

6 files changed

+7
-1
lines changed

cmd/build/helmify/replacements.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ var replacements = map[string]string{
172172
- pods/proxy
173173
- pods/attach
174174
- pods/binding
175+
- pods/resize
175176
- deployments/scale
176177
- replicasets/scale
177178
- statefulsets/scale
@@ -256,6 +257,7 @@ var replacements = map[string]string{
256257
- 'pods/proxy'
257258
- 'pods/attach'
258259
- 'pods/binding'
260+
- 'pods/resize'
259261
- 'deployments/scale'
260262
- 'replicasets/scale'
261263
- 'statefulsets/scale'

config/webhook/manifests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ webhooks:
8383
- pods/proxy
8484
- pods/attach
8585
- pods/binding
86+
- pods/resize
8687
- deployments/scale
8788
- replicasets/scale
8889
- statefulsets/scale

manifest_staging/charts/gatekeeper/templates/gatekeeper-mutating-webhook-configuration-mutatingwebhookconfiguration.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ webhooks:
7272
- pods/proxy
7373
- pods/attach
7474
- pods/binding
75+
- pods/resize
7576
- deployments/scale
7677
- replicasets/scale
7778
- statefulsets/scale

manifest_staging/charts/gatekeeper/templates/gatekeeper-validating-webhook-configuration-validatingwebhookconfiguration.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ webhooks:
7979
- 'pods/proxy'
8080
- 'pods/attach'
8181
- 'pods/binding'
82+
- 'pods/resize'
8283
- 'deployments/scale'
8384
- 'replicasets/scale'
8485
- 'statefulsets/scale'

manifest_staging/deploy/gatekeeper.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5370,6 +5370,7 @@ webhooks:
53705370
- pods/proxy
53715371
- pods/attach
53725372
- pods/binding
5373+
- pods/resize
53735374
- deployments/scale
53745375
- replicasets/scale
53755376
- statefulsets/scale

pkg/webhook/policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func init() {
8080

8181
// Explicitly list all known subresources except "status" (to avoid destabilizing the cluster and increasing load on gatekeeper). But include "services/status" for constraints that mitigate CVE-2020-8554.
8282
// You can find a rough list of subresources by doing a case-sensitive search in the Kubernetes codebase for 'Subresource("'
83-
// +kubebuilder:webhook:verbs=create;update,path=/v1/admit,mutating=false,failurePolicy=ignore,groups=*,resources=*;pods/ephemeralcontainers;pods/exec;pods/log;pods/eviction;pods/portforward;pods/proxy;pods/attach;pods/binding;deployments/scale;replicasets/scale;statefulsets/scale;replicationcontrollers/scale;services/proxy;nodes/proxy;services/status,versions=*,name=validation.gatekeeper.sh,sideEffects=None,admissionReviewVersions=v1;v1beta1,matchPolicy=Exact
83+
// +kubebuilder:webhook:verbs=create;update,path=/v1/admit,mutating=false,failurePolicy=ignore,groups=*,resources=*;pods/ephemeralcontainers;pods/exec;pods/log;pods/eviction;pods/portforward;pods/proxy;pods/attach;pods/binding;pods/resize;deployments/scale;replicasets/scale;statefulsets/scale;replicationcontrollers/scale;services/proxy;nodes/proxy;services/status,versions=*,name=validation.gatekeeper.sh,sideEffects=None,admissionReviewVersions=v1;v1beta1,matchPolicy=Exact
8484
// +kubebuilder:rbac:groups=*,resources=*,verbs=get;list;watch
8585

8686
// AddPolicyWebhook registers the policy webhook server with the manager.

0 commit comments

Comments
 (0)