Skip to content

Commit

Permalink
making servers field also immutable
Browse files Browse the repository at this point in the history
Signed-off-by: pjuarezd <pjuarezd@users.noreply.github.com>
  • Loading branch information
pjuarezd committed Apr 13, 2024
1 parent 443f958 commit b8f7e13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helm/operator/templates/minio.min.io_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3054,6 +3054,9 @@ spec:
servers:
format: int32
type: integer
x-kubernetes-validations:
- message: servers is immutable
rule: self == oldSelf
tolerations:
items:
properties:
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/minio.min.io/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ type Pool struct {
// Specify the name of the pool. The Operator automatically generates the pool name if this field is omitted.
Name string `json:"name"`
// *Required*
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="servers is immutable"
//
// The number of MinIO server pods to deploy in the pool. The minimum value is `2`.
//
Expand Down
3 changes: 3 additions & 0 deletions resources/base/crds/minio.min.io_tenants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3054,6 +3054,9 @@ spec:
servers:
format: int32
type: integer
x-kubernetes-validations:
- message: servers is immutable
rule: self == oldSelf
tolerations:
items:
properties:
Expand Down

0 comments on commit b8f7e13

Please sign in to comment.