Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,15 @@ tests:
logLevel: Normal
operatorLogLevel: Normal
backendQuotaGiB: 16
- name: Should be able to create with 20 BackendQuotaGiB
- name: Should not be able to create with more than 16 BackendQuotaGiB (20)
initial: |
apiVersion: operator.openshift.io/v1
kind: Etcd
metadata:
name: gib20
spec:
backendQuotaGiB: 20
expected: |
apiVersion: operator.openshift.io/v1
kind: Etcd
metadata:
name: gib20
spec:
logLevel: Normal
operatorLogLevel: Normal
backendQuotaGiB: 20
- name: Should be able to create with 32 BackendQuotaGiB
initial: |
apiVersion: operator.openshift.io/v1
kind: Etcd
metadata:
name: gib32
spec:
backendQuotaGiB: 32
expected: |
apiVersion: operator.openshift.io/v1
kind: Etcd
metadata:
name: gib32
spec:
logLevel: Normal
operatorLogLevel: Normal
backendQuotaGiB: 32
expectedError: "spec.backendQuotaGiB: Invalid value: 20: spec.backendQuotaGiB in body should be less than or equal to 16"
- name: Should not be able to create with less than 8 BackendQuotaGiB
initial: |
apiVersion: operator.openshift.io/v1
Expand All @@ -82,15 +57,15 @@ tests:
spec:
backendQuotaGiB: 6
expectedError: "spec.backendQuotaGiB: Invalid value: 6: spec.backendQuotaGiB in body should be greater than or equal to 8"
- name: Should not be able to create with more than 32 BackendQuotaGiB
- name: Should not be able to create with more than 16 BackendQuotaGiB (40)
initial: |
apiVersion: operator.openshift.io/v1
kind: Etcd
metadata:
name: gib40
spec:
backendQuotaGiB: 40
expectedError: "spec.backendQuotaGiB: Invalid value: 40: spec.backendQuotaGiB in body should be less than or equal to 32"
expectedError: "spec.backendQuotaGiB: Invalid value: 40: spec.backendQuotaGiB in body should be less than or equal to 16"
onUpdate:
- name: Should be able to create with default then upgrade to 16
initial: |
Expand Down Expand Up @@ -132,7 +107,7 @@ tests:
spec:
backendQuotaGiB: 8
expectedError: etcd backendQuotaGiB may not be decreased
- name: Should not be allowed to upgrade to more than 32 BackendQuotaGiB
- name: Should not be allowed to upgrade to more than 16 BackendQuotaGiB
initial: |
apiVersion: operator.openshift.io/v1
kind: Etcd
Expand All @@ -147,4 +122,4 @@ tests:
name: gib40
spec:
backendQuotaGiB: 40
expectedError: "spec.backendQuotaGiB: Invalid value: 40: spec.backendQuotaGiB in body should be less than or equal to 32"
expectedError: "spec.backendQuotaGiB: Invalid value: 40: spec.backendQuotaGiB in body should be less than or equal to 16"
4 changes: 2 additions & 2 deletions operator/v1/types_etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ type EtcdSpec struct {
HardwareSpeed ControlPlaneHardwareSpeed `json:"controlPlaneHardwareSpeed"`

// backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
// The value should be an integer not less than 8 and not more than 32.
// The value should be an integer not less than 8 and not more than 16.
// When not specified, the default value is 8.
// +kubebuilder:default:=8
// +kubebuilder:validation:Minimum=8
// +kubebuilder:validation:Maximum=32
// +kubebuilder:validation:Maximum=16
Comment thread
dusk125 marked this conversation as resolved.
// +kubebuilder:validation:XValidation:rule="self>=oldSelf",message="etcd backendQuotaGiB may not be decreased"
// +openshift:enable:FeatureGate=EtcdBackendQuota
// +default=8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ spec:
default: 8
description: |-
backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
The value should be an integer not less than 8 and not more than 32.
The value should be an integer not less than 8 and not more than 16.
When not specified, the default value is 8.
format: int32
maximum: 32
maximum: 16
minimum: 8
type: integer
x-kubernetes-validations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ spec:
default: 8
description: |-
backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
The value should be an integer not less than 8 and not more than 32.
The value should be an integer not less than 8 and not more than 16.
When not specified, the default value is 8.
format: int32
maximum: 32
maximum: 16
minimum: 8
type: integer
x-kubernetes-validations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ spec:
default: 8
description: |-
backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
The value should be an integer not less than 8 and not more than 32.
The value should be an integer not less than 8 and not more than 16.
When not specified, the default value is 8.
format: int32
maximum: 32
maximum: 16
minimum: 8
type: integer
x-kubernetes-validations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ spec:
default: 8
description: |-
backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
The value should be an integer not less than 8 and not more than 32.
The value should be an integer not less than 8 and not more than 16.
When not specified, the default value is 8.
format: int32
maximum: 32
maximum: 16
minimum: 8
type: integer
x-kubernetes-validations:
Expand Down
2 changes: 1 addition & 1 deletion operator/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ spec:
default: 8
description: |-
backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
The value should be an integer not less than 8 and not more than 32.
The value should be an integer not less than 8 and not more than 16.
When not specified, the default value is 8.
format: int32
maximum: 32
maximum: 16
minimum: 8
type: integer
x-kubernetes-validations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ spec:
default: 8
description: |-
backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
The value should be an integer not less than 8 and not more than 32.
The value should be an integer not less than 8 and not more than 16.
When not specified, the default value is 8.
format: int32
maximum: 32
maximum: 16
minimum: 8
type: integer
x-kubernetes-validations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ spec:
default: 8
description: |-
backendQuotaGiB sets the etcd backend storage size limit in gibibytes.
The value should be an integer not less than 8 and not more than 32.
The value should be an integer not less than 8 and not more than 16.
When not specified, the default value is 8.
format: int32
maximum: 32
maximum: 16
minimum: 8
type: integer
x-kubernetes-validations:
Expand Down