kubewharf / kubeadmiral

Multi-Cluster Kubernetes Orchestration
Apache License 2.0
658 stars 89 forks source link

Need a webhook to constrain user input #294

Open Poor12 opened 7 months ago

Poor12 commented 7 months ago

As the fields of policy API expand, there are more and more composite scenarios that require verification. Though we can disable user misconfiguration at runtime, it is not as effective as blocking user input at the source. At the same time, users configure fields in the API, but it does not take effect, which also makes users confused.

For example, SchedulingMode is Duplicate, will not work with replicaStrategy. ReplicaStrategy is spread, will not work with maxClusters.

Moreover, in the early stages of some features, we can prevent some unpredictable scenarios by limiting its changes. We will not allow users to make these kinds of modifications until we have fully verified it.

For example, users change replicaStrategy=weighted to binpack.