File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,13 @@ type Schema struct {
5252 // and create the CRD for the resourcegroup.
5353 //
5454 // +kubebuilder:validation:Required
55+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="kind is immutable"
5556 Kind string `json:"kind,omitempty"`
5657 // The APIVersion of the resourcegroup. This is used to generate
5758 // and create the CRD for the resourcegroup.
5859 //
5960 // +kubebuilder:validation:Required
61+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="apiVersion is immutable"
6062 APIVersion string `json:"apiVersion,omitempty"`
6163 // The spec of the resourcegroup. Typically, this is the spec of
6264 // the CRD that the resourcegroup is managing. This is adhering
Original file line number Diff line number Diff line change @@ -100,11 +100,17 @@ spec:
100100 The APIVersion of the resourcegroup. This is used to generate
101101 and create the CRD for the resourcegroup.
102102 type : string
103+ x-kubernetes-validations :
104+ - message : apiVersion is immutable
105+ rule : self == oldSelf
103106 kind :
104107 description : |-
105108 The kind of the resourcegroup. This is used to generate
106109 and create the CRD for the resourcegroup.
107110 type : string
111+ x-kubernetes-validations :
112+ - message : kind is immutable
113+ rule : self == oldSelf
108114 spec :
109115 description : |-
110116 The spec of the resourcegroup. Typically, this is the spec of
You can’t perform that action at this time.
0 commit comments