Merge pull request #15842 from yifeng-cerebras/yifeng/network-provider-validation-fix

network/provider-validation-rule-fix
This commit is contained in:
Travis Nielsen authored and GitHub committed 2025-05-09 12:14:49 -06:00
commit f5e4977c8f
3 files changed
+3 -3

No files matched your search

@@ -2856,7 +2856,7 @@ spec:
type: string
x-kubernetes-validations:
- message: network provider must be disabled (reverted to empty string) before a new provider is enabled
rule: self == '' || self == oldSelf
rule: self == '' || oldSelf == '' || self == oldSelf
selectors:
additionalProperties:
type: string
+1 -1
View File
@@ -2854,7 +2854,7 @@ spec:
type: string
x-kubernetes-validations:
- message: network provider must be disabled (reverted to empty string) before a new provider is enabled
rule: self == '' || self == oldSelf
rule: self == '' || oldSelf == '' || self == oldSelf
selectors:
additionalProperties:
type: string
+1 -1
View File
@@ -2764,7 +2764,7 @@ type AdditionalVolumeMounts []AdditionalVolumeMount
type NetworkSpec struct {
// Provider is what provides network connectivity to the cluster e.g. "host" or "multus".
// If the Provider is updated from being empty to "host" on a running cluster, then the operator will automatically fail over all the mons to apply the "host" network settings.
// +kubebuilder:validation:XValidation:message="network provider must be disabled (reverted to empty string) before a new provider is enabled",rule="self == '' || self == oldSelf"
// +kubebuilder:validation:XValidation:message="network provider must be disabled (reverted to empty string) before a new provider is enabled",rule="self == '' || oldSelf == '' || self == oldSelf"
// +nullable
// +optional
Provider NetworkProviderType `json:"provider,omitempty"`