You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api: Add NetworkFenceClassName to NetworkFence spec
This patch adds NetworkFenceClassName to NetworkFence spec
and deprecates specifying driver, secrets and parameters
inside NetworkFence spec.
When this value is present; the driver, secrets and parameters
are read from the specified networkfence class.
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
Copy file name to clipboardExpand all lines: api/csiaddons/v1alpha1/networkfence_types.go
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -66,9 +66,16 @@ type SecretSpec struct {
66
66
// NetworkFenceSpec defines the desired state of NetworkFence
67
67
// +kubebuilder:validation:XValidation:rule="has(self.parameters) == has(oldSelf.parameters)",message="parameters are immutable"
68
68
// +kubebuilder:validation:XValidation:rule="has(self.secret) == has(oldSelf.secret)",message="secret is immutable"
69
+
// +kubebuilder:validation:XValidation:rule="has(self.driver) || has(self.networkFenceClassName)",message="one of driver or networkFenceClassName must be present"
69
70
typeNetworkFenceSpecstruct {
70
-
// Driver contains the name of CSI driver.
71
-
// +kubebuilder:validation:Required
71
+
// NetworkFenceClassName contains the name of the NetworkFenceClass
72
+
// +kubebuilder:validation:Optional
73
+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="networkFenceClassName is immutable"
0 commit comments