@@ -24,8 +24,6 @@ default admission controls. This document hashes out the implementation details.
24
24
* Do not block the entire cluster if the initializers/webhooks are not ready
25
25
after registration.
26
26
27
- * Admin can enforce initializers to specific namespaces.
28
-
29
27
## Specification
30
28
31
29
We assume initializers could be "fail open". We need to update the extensible
@@ -75,13 +73,6 @@ type Initializer struct {
75
73
// if the timeout is reached. The default timeout for each initializer is
76
74
// 5s.
77
75
FailurePolicy *FailurePolicyType ` json:"failurePolicy,omitempty"`
78
-
79
- // Selects Namespaces using cluster scoped-labels. This
80
- // matches all pods in all namespaces selected by this label selector.
81
- // This field follows standard label selector semantics.
82
- // If present but empty, this selector selects all namespaces.
83
- // +optional
84
- NamespaceSelector *metav1.LabelSelector ` json:"namespaceSelector,omitempty"`
85
76
}
86
77
87
78
// Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended
@@ -282,23 +273,6 @@ crashes, so it is rare.
282
273
283
274
See [ Considered but REJECTED alternatives] ( #considered-but-rejected-alternatives ) for considered alternatives.
284
275
285
- ## Enforce initializers to specific namespaces
286
-
287
- Current ` InitializerConfiguration ` is at the cluster level and all of the to-be-created resources (such as rc and deployments) defined in ` Rules `
288
- will be appended with the pending initializers automatically during creation, regardless of the namespace.
289
- There is no way to only apply the initializers to specific namespaces.
290
-
291
- For example, when running a multi-tenant cluster, it'd be quite useful to only apply the rules in just certain namespaces. Sometimes we
292
- don't want to enforce in "kube-* " related namespaces as well.
293
-
294
- With the help of ` NamespaceSelector ` , we can
295
-
296
- * Apply initializer to ALL namespaces (by default);
297
- * Apply initializer to limited namespaces using label selector;
298
-
299
- Since most users won't add extra labels for namespaces explicitly when creating new resources, the selector matching should only be applied to
300
- ` labels.Set(map[string]string{"namespace": namespace}) ` instead of widely-used ` metadata.Labels ` .
301
-
302
276
## Future work
303
277
304
278
1 . Figuring out a better schema to represent the order among
0 commit comments