Skip to content
Merged
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
57 changes: 37 additions & 20 deletions config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25369,29 +25369,46 @@ spec:
required:
- enabled
type: object
storageAutoscaling:
storageScaling:
properties:
enabled:
autoscaling:
properties:
enabled:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
enableExternalAutoscaling:
type: boolean
enableVolumeScaling:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
x-kubernetes-validations:
- message: autoscaling cannot be enabled when enableVolumeScaling
is disabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || self.enableVolumeScaling'
- message: autoscaling cannot be enabled when enableExternalAutoscaling
is enabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || !has(self.enableExternalAutoscaling)
|| !self.enableExternalAutoscaling'
tls:
properties:
allowInvalidCertificates:
Expand Down
57 changes: 37 additions & 20 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26256,29 +26256,46 @@ spec:
required:
- enabled
type: object
storageAutoscaling:
storageScaling:
properties:
enabled:
autoscaling:
properties:
enabled:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
enableExternalAutoscaling:
type: boolean
enableVolumeScaling:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
x-kubernetes-validations:
- message: autoscaling cannot be enabled when enableVolumeScaling
is disabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || self.enableVolumeScaling'
- message: autoscaling cannot be enabled when enableExternalAutoscaling
is enabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || !has(self.enableExternalAutoscaling)
|| !self.enableExternalAutoscaling'
tls:
properties:
allowInvalidCertificates:
Expand Down
15 changes: 8 additions & 7 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ spec:
# clusterServiceDNSMode: "Internal"
# pause: true
# unmanaged: false
# enableVolumeExpansion: true
# storageAutoscaling:
# enabled: true
# triggerThresholdPercent: 80
# growthStep: 2Gi
# maxSize: "10Gi"
# enableExternalVolumeAutoscaling: false
# storageScaling:
# enableExternalAutoscaling: false
# enableVolumeScaling: false
# autoscaling:
# enabled: false
# triggerThresholdPercent: 80
# growthStep: 2Gi
# maxSize: "10Gi"
crVersion: 1.22.0
image: perconalab/percona-server-mongodb-operator:main-mongod8.0
imagePullPolicy: Always
Expand Down
57 changes: 37 additions & 20 deletions deploy/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26256,29 +26256,46 @@ spec:
required:
- enabled
type: object
storageAutoscaling:
storageScaling:
properties:
enabled:
autoscaling:
properties:
enabled:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
enableExternalAutoscaling:
type: boolean
enableVolumeScaling:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
x-kubernetes-validations:
- message: autoscaling cannot be enabled when enableVolumeScaling
is disabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || self.enableVolumeScaling'
- message: autoscaling cannot be enabled when enableExternalAutoscaling
is enabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || !has(self.enableExternalAutoscaling)
|| !self.enableExternalAutoscaling'
tls:
properties:
allowInvalidCertificates:
Expand Down
57 changes: 37 additions & 20 deletions deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26256,29 +26256,46 @@ spec:
required:
- enabled
type: object
storageAutoscaling:
storageScaling:
properties:
enabled:
autoscaling:
properties:
enabled:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
enableExternalAutoscaling:
type: boolean
enableVolumeScaling:
type: boolean
growthStep:
anyOf:
- type: integer
- type: string
default: 2Gi
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
maxSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
triggerThresholdPercent:
default: 80
maximum: 95
minimum: 50
type: integer
type: object
x-kubernetes-validations:
- message: autoscaling cannot be enabled when enableVolumeScaling
is disabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || self.enableVolumeScaling'
- message: autoscaling cannot be enabled when enableExternalAutoscaling
is enabled
rule: '!has(self.autoscaling) || !has(self.autoscaling.enabled)
|| !self.autoscaling.enabled || !has(self.enableExternalAutoscaling)
|| !self.enableExternalAutoscaling'
tls:
properties:
allowInvalidCertificates:
Expand Down
13 changes: 7 additions & 6 deletions e2e-tests/pvc-auto-resize/conf/some-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ spec:
image:
imagePullPolicy: Always
allowUnsafeConfigurations: false
enableVolumeExpansion: true
storageAutoscaling:
enabled: true
triggerThresholdPercent: 80
growthStep: "2Gi"
maxSize: "10Gi"
storageScaling:
enableVolumeScaling: true
autoscaling:
enabled: true
triggerThresholdPercent: 80
growthStep: "2Gi"
maxSize: "10Gi"
backup:
enabled: false
replsets:
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/pvc-resize/run
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if wait_all_pvc_resize "2Gi" 120 1; then
fi

echo "Enabling PVC resize"
kubectl_bin patch psmdb "${cluster}" --type=json -p='[{"op": "add", "path": "/spec/enableVolumeExpansion", "value":true }]'
kubectl_bin patch psmdb "${cluster}" --type=json -p='[{"op": "add", "path": "/spec/storageScaling", "value":{"enableVolumeScaling":true} }]'
sleep 10

wait_cluster_consistency "$cluster"
Expand All @@ -121,7 +121,7 @@ if [[ $EKS == 1 || -n ${OPENSHIFT} ]]; then
spinup_psmdb "${cluster}-rs0" "$test_dir/conf/$cluster.yml"
fi
echo "Enabling PVC resize after recreating PSMDB cluster ${cluster} "
kubectl_bin patch psmdb "${cluster}" --type=json -p='[{"op": "add", "path": "/spec/enableVolumeExpansion", "value":true }]'
kubectl_bin patch psmdb "${cluster}" --type=json -p='[{"op": "add", "path": "/spec/storageScaling", "value":{"enableVolumeScaling":true} }]'
sleep 10

wait_cluster_consistency "$cluster"
Expand Down
3 changes: 2 additions & 1 deletion e2e-tests/unsafe-psa/conf/unsafe-psa-rs0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ spec:
#platform: openshift
image:
imagePullPolicy: Always
enableVolumeExpansion: true
storageScaling:
enableVolumeScaling: true
unsafeFlags:
replsetSize: true
secrets:
Expand Down
1 change: 1 addition & 0 deletions e2e-tests/unsafe-psa/run
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function main() {
spinup_psmdb "$cluster" "$test_dir/conf/$cluster.yml" "3"
wait_cluster_consistency "$psmdb"

# PVC resize did not work for PSA deployment and it was fixed in 1.22
desc 'resizing PVCs'
patch_pvc_request "$psmdb" "2G"
wait_cluster_consistency "$psmdb"
Expand Down
Loading
Loading