Hi all, I’ve been trying to find a way to manage resource quotas by projet, and I’m not sure it’s possible. I’d appreciate any help!
Basically as I’ve said, I want to grant a project X resources. But I DON’T want to have to manage namespace level quotas. In other words, I would like to allow any namespace in a project full access to all of the resources allowed in the project quota, at the expense of all other namespaces. The reason for this is that I am using namespaces only as logical groupings for ephemeral projects, IE, when a developer goes to create an application off of a feature branch, a new namespace is created, and deleted hours or days later, when testing is finished. There are also permanent namespaces. The resources in namespaces are scaled up or down occasionally as well.
I would like if I could just scale up or down as desired without first having to override a default quota, which would require me to check the current available resources in the project quota, and then override the namespace.
As I understand it, with Rancher Project quotas, quotas are calculated by allocation and not by useage. So even if the Project has lots of unused (unallocated?) resources, I still can’t grow my usage, since the namespace has it’s own quota, and I have no choice but to scale up the namespace statically first, by overrding the default quota, and only then can I utilize more resources.
Ideally I would be able to set a namespace default quota which is not bound to the available project quota, then when creating namespaces they would hit the project level quota limit before the namespace limit, however from what I gather there is no actual Project resource, it is just a label applied to the namespace, so there isn’t actually any way to do this if I use Rancher’s project quotas.
The only way around this that I could think of would be to set a “fake”, huge number as the Project’s quota, then set the default project quota as the actual number, and prevent users from overriding the default. Of course then I’d also have to make some kind of admission controller to prevent the creation of namespaces after a certain point…
If there’s a way to do what I want, naturally that would be perfect, but if there isn;t and I’ve understood correctly, just a quick “yes, you understand right” would be helpful as wall.
Thanks!