Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#766 from rabi/immutable
Browse files Browse the repository at this point in the history
Make OpenStackDataPlaneDeployment Spec immutable
  • Loading branch information
openshift-merge-bot[bot] authored Mar 18, 2024
2 parents 4679cc5 + 2432668 commit 2cc8eb8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ spec:
- deploymentRequeueTime
- nodeSets
type: object
x-kubernetes-validations:
- message: OpenStackDataPlaneDeployment Spec is immutable
rule: self == oldSelf
status:
properties:
conditions:
Expand Down
1 change: 1 addition & 0 deletions api/v1beta1/openstackdataplanedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ type OpenStackDataPlaneDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="OpenStackDataPlaneDeployment Spec is immutable"
Spec OpenStackDataPlaneDeploymentSpec `json:"spec,omitempty"`
Status OpenStackDataPlaneDeploymentStatus `json:"status,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ spec:
- deploymentRequeueTime
- nodeSets
type: object
x-kubernetes-validations:
- message: OpenStackDataPlaneDeployment Spec is immutable
rule: self == oldSelf
status:
properties:
conditions:
Expand Down

0 comments on commit 2cc8eb8

Please sign in to comment.