Conversation
|
Maybe it also makes sense to change in our CR orchestrator.enabled true -> false as we use group replication. And also I have a question maybe for @egegunes @hors I don't remember why we use GR in cr.yaml, but if the value is empty we use Async |
addressed ✅ |
| // +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.unsafeFlags.orchestrator || self.orchestrator.enabled",message="Invalid configuration: When 'mysql.clusterType' is set to 'async', 'orchestrator.enabled' must be true unless 'unsafeFlags.orchestrator' is enabled" | ||
| // +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.unsafeFlags.proxy || self.proxy.haproxy.enabled",message="Invalid configuration: When 'mysql.clusterType' is set to 'async', 'proxy.haproxy.enabled' must be true unless 'unsafeFlags.proxy' is enabled" | ||
| // +kubebuilder:validation:XValidation:rule="!(self.mysql.clusterType == 'async') || self.proxy.router == null || !has(self.proxy.router.enabled) || !self.proxy.router.enabled",message="Invalid configuration: When 'mysql.clusterType' is set to 'async', 'proxy.router.enabled' must be disabled" |
There was a problem hiding this comment.
We could introduce more validations e.g. for the cluster sizes, but adding them now means that we will start effecting the unit testing we have like
var _ = Describe("Unsafe configurations", Ordered, func() {
....
This could also mean that the old validations will become obsolete. We will keep the focus for now only on the cluster type as we initially discussed, and followup with adding more rules here as part of a new ticket that also removes some of the old validations.
commit: b4b31d8 |
CHANGE DESCRIPTION
Problem:
Related PR: #308
Below we have some example of the validations. At the last example we apply the cr with the default values as they are committed in main.
Image:
perconalab/percona-server-mysql-operator:K8SPS-212-4Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability