Skip to content

Commit

Permalink
Set rule only for size integer value
Browse files Browse the repository at this point in the history
  • Loading branch information
grischperl committed Nov 21, 2023
1 parent d815896 commit 1709947
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion api/v1alpha1/nats_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ type NATSStatus struct {
type NATSSpec struct {
// Cluster defines configurations that are specific to NATS clusters.
// +kubebuilder:default:={size:3}
// +kubebuilder:validation:XValidation:rule="!(oldSelf.size > 1 && self.size == 1)", message="size cannot be reduced to 1 once it was >1"
Cluster `json:"cluster,omitempty"`

// JetStream defines configurations that are specific to NATS JetStream.
Expand Down
3 changes: 0 additions & 3 deletions config/crd/bases/operator.kyma-project.io_nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ spec:
- message: size cannot be reduced to 1 once it was >1
rule: '!(oldSelf > 1 && self == 1)'
type: object
x-kubernetes-validations:
- message: size cannot be reduced to 1 once it was >1
rule: '!(oldSelf.size > 1 && self.size == 1)'
jetStream:
default:
fileStorage:
Expand Down

0 comments on commit 1709947

Please sign in to comment.