You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -229,6 +226,12 @@ type MutatingWebhook struct {
229
226
230
227
// MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
231
228
type MatchCondition struct {
229
+
// Name is an identifier for this match condition, used for strategic merging of MatchConditions,
230
+
// as well as providing an identifier for logging purposes. A good name should be descriptive of
231
+
// the associated expression.
232
+
// Name must be a valid RFC 1123 DNS subdomain, and unique in a set of MatchConditions.
233
+
// Required.
234
+
Name string `json:"name"`
232
235
// NOTE: Placeholder documentation, to be replaced by https://github.com/kubernetes/website/issues/39089.
233
236
//
234
237
// Expression represents the expression which will be evaluated by CEL.
@@ -266,7 +269,7 @@ a CEL expression adds a potential failure point. This can be mitigated by testin
266
269
ecosystem currently lacks some of the tools that would make this easier.
267
270
268
271
Of particular significance are match conditions tied to non-functional properties of an object, such
269
-
as using labels to decide whether to opt an object out of a policy. Without additional admition
272
+
as using labels to decide whether to opt an object out of a policy. Without additional admission
270
273
controls on who can set those non-functional aspects, exempting the policy based on that could be a
271
274
security vulnerability. In contrast, the
272
275
[NFS example usecase](#scope-an-nfs-access-management-webhook-to-pods-mounting-nfs-volumes) exempts
@@ -449,32 +452,18 @@ in back-to-back releases.
449
452
450
453
### Upgrade / Downgrade Strategy
451
454
452
-
<!--
453
-
If applicable, how will the component be upgraded and downgraded? Make sure
454
-
this is in the test plan.
455
-
456
-
Consider the following in developing an upgrade/downgrade strategy for this
457
-
enhancement:
458
-
- What changes (in invocations, configurations, API use, etc.) is an existing
459
-
cluster required to make on upgrade, in order to maintain previous behavior?
460
-
- What changes (in invocations, configurations, API use, etc.) is an existing
461
-
cluster required to make on upgrade, in order to make use of the enhancement?
462
-
-->
455
+
Downgrading in a way that disables match conditions after it is already in use can increase the
456
+
scope of requests evaluated by a webhook. See
457
+
[Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?](#can-the-feature-be-disabled-once-it-has-been-enabled-ie-can-we-roll-back-the-enablement)
458
+
for more details
463
459
464
460
### Version Skew Strategy
465
461
466
-
<!--
467
-
If applicable, how will the component handle version skew with other
468
-
components? What are the guarantees? Make sure this is in the test plan.
469
-
470
-
Consider the following in developing a version skew strategy for this
471
-
enhancement:
472
-
- Does this enhancement involve coordinating behavior in the control plane and
473
-
in the kubelet? How does an n-2 kubelet without this feature available behave
474
-
when this feature is used?
475
-
- Will any other components on the node change? For example, changes to CSI,
476
-
CRI or CNI may require updating that component before the kubelet.
477
-
-->
462
+
The new field is only evaluated by the apiserver, so only HA apiserver version skew is relevant. In
463
+
this case, if the feature is enabled in one apiserver and not another, a request could
464
+
non-deterministically be sent to a webhook. Enabling match conditions without setting
465
+
`matchConditions` on an webhooks is a no-op, so the version skew non-determinism is best avoided by
466
+
waiting until it has been enabled in all apiservers before starting to use the new field.
478
467
479
468
## Production Readiness Review Questionnaire
480
469
@@ -590,6 +579,14 @@ Even if applying deprecation policies, they may still surprise some users.
590
579
591
580
### Monitoring Requirements
592
581
582
+
A new per-webhook metric will measure the number of requests excluded by match conditions:
0 commit comments