Skip to content

Commit b523276

Browse files
committed
Prod Readiness (alpha)
1 parent 19321af commit b523276

File tree

2 files changed

+21
-32
lines changed
  • keps
    • prod-readiness/sig-api-machinery
    • sig-api-machinery/3716-webhook-predicates

2 files changed

+21
-32
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# The KEP must have an approver from the
2+
# "prod-readiness-approvers" group
3+
# of http://git.k8s.io/enhancements/OWNERS_ALIASES
4+
kep-number: 3716
5+
alpha:
6+
approver: "@deads2k"

keps/sig-api-machinery/3716-webhook-predicates/README.md

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -507,47 +507,27 @@ This section must be completed when targeting alpha to a release.
507507

508508
###### How can this feature be enabled / disabled in a live cluster?
509509

510-
<!--
511-
Pick one of these and delete the rest.
512-
513-
Documentation is available on [feature gate lifecycle] and expectations, as
514-
well as the [existing list] of feature gates.
515-
516-
[feature gate lifecycle]: https://git.k8s.io/community/contributors/devel/sig-architecture/feature-gates.md
517-
[existing list]: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
518-
-->
519-
520-
- [ ] Feature gate (also fill in values in `kep.yaml`)
521-
- Feature gate name:
522-
- Components depending on the feature gate:
523-
- [ ] Other
524-
- Describe the mechanism:
525-
- Will enabling / disabling the feature require downtime of the control
526-
plane?
527-
- Will enabling / disabling the feature require downtime or reprovisioning
528-
of a node? (Do not assume `Dynamic Kubelet Config` feature is enabled).
510+
- [X] Feature gate (also fill in values in `kep.yaml`)
511+
- Feature gate name: `AdmissionWebhookMatchConditions`
512+
- Components depending on the feature gate: `kube-apiserver`
529513

530514
###### Does enabling the feature change any default behavior?
531515

532-
<!--
533-
Any change of default behavior may be surprising to users or break existing
534-
automations, so be extremely careful here.
535-
-->
516+
No. If the feature is enabled, but the `matchConditions` field is unset, the default behavior
517+
remains unchanged.
536518

537519
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
538520

539-
<!--
540-
Describe the consequences on existing workloads (e.g., if this is a runtime
541-
feature, can it break the existing applications?).
521+
Yes. Disabling the feature gate will ignore any `matchConditions` set, and return to the default
522+
behavior. This could increase the traffic to the webhook, and potentially increase the error rate if
523+
the webhook is down or rejects those requests.
542524

543-
Feature gates are typically disabled by setting the flag to `false` and
544-
restarting the component. No other changes should be necessary to disable the
545-
feature.
525+
###### What happens if we reenable the feature if it was previously rolled back?
546526

547-
NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
548-
-->
527+
Any `matchConditions` that were already stored on existing webhooks will be enforced.
549528

550-
###### What happens if we reenable the feature if it was previously rolled back?
529+
Note: enabling `matchConditions` can only reduce the number of requests being sent to a webhook (or
530+
remain unchanged). Enabling it will never increase the number of requests.
551531

552532
###### Are there any tests for feature enablement/disablement?
553533

@@ -564,6 +544,9 @@ You can take a look at one potential example of such test in:
564544
https://github.com/kubernetes/kubernetes/pull/97058/files#diff-7826f7adbc1996a05ab52e3f5f02429e94b68ce6bce0dc534d1be636154fded3R246-R282
565545
-->
566546

547+
[Registry tests](https://github.com/kubernetes/kubernetes/blob/c4ebbeeb747cd3e2b1d83733a14d367a65723a45/pkg/registry/core/pod/strategy_test.go)
548+
will verify the drop disabled fields logic is correctly implemented.
549+
567550
### Rollout, Upgrade and Rollback Planning
568551

569552
<!--

0 commit comments

Comments
 (0)