red-hat-storage / ocs-operator

Operator for RHOCS
Apache License 2.0
85 stars 184 forks source link

create a webhook to prevent creation of second storageCluster in the same namespace #2877

Open rewantsoni opened 3 weeks ago

rewantsoni commented 3 weeks ago

Currently, we allow the user to create multiple storageClusters in the same namespace, expect the first storage cluster others are marked as Ignored.

We should restrict creating the second storageCluster in the same namespace using a webhook.

Originally Posted in https://github.com/red-hat-storage/ocs-operator/pull/2844#discussion_r1829969197

@malayparida2000 I understand what you are saying, but that is a scenario we should 
not address this way. That is a user error, and if we want to solve it we should introduce 
a webhook to prevent the creation of a second storage cluster.