-
Notifications
You must be signed in to change notification settings - Fork 4
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
sf-client network list has no --namespace option #73
Comments
In fact, most calls lack a namespace argument. I think this is more complicated than I want it to be though -- at the moment we only support specifying a namespace if you're in the system namespace. Is that really worth adding something to every call? Or do we need a more complicated namespace permissions model? |
This is a good question. Should namespaces just be a separation tool or should they be a proper tenant separation? At the moment (today), I like the idea of separate namespaces for separating jobs because I can use a single So maybe a tenant permissions model goes over the top of namespaces? (k8s style) |
Yeah, I like the simplicity of what we have now. What I really want to do is something like:
Something like:
When the subclient makes a call, how does the API server know that its authorized? Maybe _actual_request_url() could insert a header or something? |
What about an |
I'm not sure about the actual efficiency of sending the namespace in the header vs as a parameter. Each call still needs to check the namespace for the particular parameter. I think you are also suggesting further change? In the case where we have multiple CI jobs running plus a couple of people working in the same cluster - a perfect example of the SF use case - it would be great to just list the instances/networks in a particular namespace. As a user, I want to quickly create a namespace, test an idea for a few days then clean away everything in the namespace. I don't want to inadvertently interfere with other work or CI jobs but still have a quick clean up option. |
So I think that use case is a good thought experiment. Here's my concern... I have a CI cluster at home. I use it for other things as well, so CI currently runs in a namespace called "ci". I like the idea of putting jobs into their own namespaces, but that menas that either: jenkins needs to run as the system namespace (yuck); or I need some way to "bless" the CI namespace as being allowed to act as other namespaces. Thoughts? |
Continuing the thought experiment - standard "just throwing out ideas" disclaimer: Sub-namespaces. (Stick with me.) Just a simple implementation. Allow a forward slash to indicate a sub-namespace.
|
I actually quite like that idea. So you'd populate the auth details for the subnamespace on creation, not just do some sort of lookup at auth time? The lookup at auth time would involve a bunch of etcd reads, so is probably expensive I suppose. |
The auth lookup could involve more than one DB lookup but it's limited to the depth of the namespace tree. It can be optimised by loading the whole namespace tree rather than executing individual DB reads. The comment relating to key inheritance is probably an implementation detail I should not have touched. I was trying to say that a user can create a sub-namespace without specifying a key. In that case the system defaults to the key for the namespace immediately above. |
I actually think that inheritance in namespaces is quite interesting. For example, I always forget to add a SSH key to my instances, could that be something which is inherited from the namespace? What about other attributes (uefi boot, default network, etc etc). |
A default ssh key and even user-data would definitely be excellent. This does complicate issues though. Do we inherit from namespaces above? Do we have a flag to not inherit? Hierarchical inheritance would be very convenient to set one ssh key and have it always used, but could lead to unexpected outcomes. Maybe inheritance in a namespace off by default. (The inheritance flag could be inherited!?) Inheritance from a namespace is probably a separate problem to sub-namepsaces. The third issue of "Hierarchical inheritance of attributes" could be a feature of sub-namespaces but I think is separate from hierarchical auth. |
Should allow listing by namespace.
The text was updated successfully, but these errors were encountered: