-
Notifications
You must be signed in to change notification settings - Fork 382
upstream k8s reuse "Service catalog follows namespace lifecycle" (create namespace if one does not exist by denying resource creation if the namespace does not exist) #586
Comments
cc @derekwaynecarr, since this is relevant to your interests |
Isn't that a little scary? A simple fat-finger could create a ton of extra namespaces over time. |
I'm not sure that I see what is scary about it. We do the same thing for every namespaced resource in kubernetes. |
that doesn't make it any less scary :-) In a previous discussion you were talking about how it may be "a good thing" that we allow dangling pointers because the other end might not be there yet. If so, why isn't this treated the same way? If things were consistent we would try to create all missing resources at the other end of a dangling resource. But clearly we don't. Not sure why namespaces should be auto-created when others aren't. How many other resources are auto-created? Is this documented some place? |
Note that #565 will not fix this issue, but will mitigate because helm can (but won't in all cases) auto-provision namespaces |
Namespace auto provision admission controller is deprecated. k8s uses NamespaceLifecycle which forces namespace to be previously created prior to creation of the resource. It also enforces new resources cannot be created when a namespace is undergoing termination. Service catalog should assume the same and reuse. I plan to help out on the namespace related issues soon. |
This thread reminds me that I need to remove those plugins in 1.8 kube. |
@pmorie -- can we relabel this issue as follows: "Service catalog follows namespace lifecycle" To summarize what would need to be done would be the following: service catalog apiserver runs an admission controller that does the following:
service catalog controller-manager runs a controller that does the following:
let's chat later this week on the best way to re-use code for the above (near and long-term). |
I am ok with doing this, but not in MVP 3. We have more pressing issues right now, and can get far by putting a note in our documentation indicating that the namespace must exist prior to creating a I am moving this to |
Is this #2258 ? |
Based on the comment #586 (comment) I think we should close this issue. We've switched to the upstream |
Also, we should never have a Service Catalog resource existing when namespace is missing - this is a bug, see #2254 and upstream PR kubernetes/kubernetes#66932 Closing this issue and marking #2254 with |
In the k8s core, there is an admission controller that autoprovisions a namespace that does not already exist when a namespaced resource is created for that namespace. We need to have equivalent functionality in service-catalog.
The text was updated successfully, but these errors were encountered: