-
Notifications
You must be signed in to change notification settings - Fork 40.5k
Make InitializerConfiguration
per namespace level
#53859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@gyliu513 Well, I don't think making the Also why not directly making your own initializer watching certain namespace, such as the namespace where the Just as @ayj mentioned, istio/old_pilot_repo#1437 and |
@dixudx I think it is the API server who added the
If namespace is configured, then |
@dixudx I think it is the API server who added the
If namespace is configured, then |
Of course I can update the initializer to handle such logic first, but I do hope that the initializer should be enhanced to support this as well. |
Since
@gyliu513 Right. This will be better. @ahmetb @caesarxuchao I am thinking whether we could add a new field like kubernetes/staging/src/k8s.io/api/admissionregistration/v1alpha1/types.go Lines 77 to 106 in 17a6115
If this field is set, then only specific namespaces will apply the WDYT? |
This is a duplicate of #51290.
|
Well, to some extent, this could help solve the problem. But only these selected We should not add magic name exceptions for general purpose mechanisms and should strictly allow those system components to congregate in
Yes, this may not be that efficiency and elegant.
+1. This looks nicer and provides more powerful selecting rules, which may be the a great bonus for choosing this. Also this keeps consistent with NetworkPolicy. |
@dixudx I was just curious whether []string is a worse idea than NamespaceSelector or not, from an API design perspective. I think almost no one labels their namespaces currently (or at least I've not seen in anywhere). That's why I don't find NetworkPolicy's design in this case particularly useful (i.e. I have to label existing namespaces like What do folks think about allowing both, but only one can be allowed at a time: namespaces:
namespaceSelector: (...LabelSelector)
names: (...[]string) |
If using
@ahmetb You're right. That's why I did not use labels when matching. Maybe we may need to add some validations to check whether the
With above implementation, we don't need to explicitly add new label |
Yeah I'm still curious if we can have a namespace selector with labels XOR well as name list (opt-out version of this) for the initializers. I think labels have merit, but in practice people are not labeling things. @dixudx I didn't fully understand your explanation above. Can you give some concrete examples? |
@ahmetb Yes, you're right. So I did not read the namespace label from And
|
@dixudx so is the NamespaceSelector field going to be of type |
Yes.
|
@dixudx (still not sure if the answer to my question is yes or no 😄 ) My understanding is that LabelSelector helps you specify a namespace like: apiVersion: v1
metadata:
name: foo
labels:
purpose: test using namespaceSelector:
purpose: test If this is not working then the behavior of the |
@ahmetb The behavior of my
Well, we could make them compatible later if there is a consensus. But if so, does it mean we have to add a new label |
/close move discussions to #51290. |
…lizer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
…for_initializer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
…lizer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
…lizer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
…lizer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
…lizer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
…lizer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
…lizer Automatic merge from submit-queue. add NamespaceSelector to select namespaces for Initializers issue kubernetes/kubernetes#51290, kubernetes/kubernetes#53859 xref PR kubernetes/kubernetes#53879 /cc @ahmetb @gyliu513 @liggitt @smarterclayton @caesarxuchao
Is this a BUG REPORT or FEATURE REQUEST?:
/kind feature
What happened:
This is a issue from istio istio/istio.io#660
The current
InitializerConfiguration
is cluster level and all of the affected resources (deployment etc) will be adding thepending initializers
, but if the initializers are down or the initializer does not clear thepending initializers
, the resources will always hang.It is better make the
InitializerConfiguration
namespace level./cc @caesarxuchao
/sig api-machinery
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):The text was updated successfully, but these errors were encountered: