Is it possible to configure which storageclasses can be used by namespace?
So for example I have a single cluster for production and development.
I want to configure a set of storageclasses for development and a different set of storageclasses for production.
I want to strictly configure that in development no one could use the storageclasses of production.
Is this possible?
I have only seen the option to use the resource quotas at namespace level, but it is not the same, with quotas I can configure the amount of disk that can be used in each storageclass, so if I create a new storageclass I will have to modify all the quotas in all the namespaces to add the constraints about the new storageclass.
StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.
A storage class in Kubernetes is a cluster-wide resource, so you can't restrict the usage regarding a namespace out-of-the-box. What you can do, however, is to write a customer controller akin to what Banzai did with their PVC Operator or Raffaele Spazzoli's Namespace Configuration Controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With