Skip to content

Commit cc28876

Browse files
committed
K8SPSMDB-1472 automatic PVC resizing
1 parent 098b0d7 commit cc28876

File tree

20 files changed

+1207
-24
lines changed

20 files changed

+1207
-24
lines changed

config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25356,6 +25356,23 @@ spec:
2535625356
required:
2535725357
- enabled
2535825358
type: object
25359+
storageAutoscaling:
25360+
properties:
25361+
enabled:
25362+
type: boolean
25363+
growthStepGi:
25364+
default: 2
25365+
format: int64
25366+
minimum: 1
25367+
type: integer
25368+
maxSize:
25369+
type: string
25370+
triggerThresholdPercent:
25371+
default: 80
25372+
maximum: 95
25373+
minimum: 50
25374+
type: integer
25375+
type: object
2535925376
tls:
2536025377
properties:
2536125378
allowInvalidCertificates:
@@ -25562,6 +25579,28 @@ spec:
2556225579
type: integer
2556325580
state:
2556425581
type: string
25582+
storageAutoscaling:
25583+
additionalProperties:
25584+
properties:
25585+
currentSize:
25586+
type: string
25587+
lastCheckTime:
25588+
format: date-time
25589+
type: string
25590+
lastError:
25591+
type: string
25592+
lastResizeTime:
25593+
format: date-time
25594+
type: string
25595+
lastUsagePercent:
25596+
type: integer
25597+
pvcName:
25598+
type: string
25599+
resizeCount:
25600+
format: int32
25601+
type: integer
25602+
type: object
25603+
type: object
2556525604
required:
2556625605
- ready
2556725606
- size

deploy/bundle.yaml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26217,6 +26217,23 @@ spec:
2621726217
required:
2621826218
- enabled
2621926219
type: object
26220+
storageAutoscaling:
26221+
properties:
26222+
enabled:
26223+
type: boolean
26224+
growthStepGi:
26225+
default: 2
26226+
format: int64
26227+
minimum: 1
26228+
type: integer
26229+
maxSize:
26230+
type: string
26231+
triggerThresholdPercent:
26232+
default: 80
26233+
maximum: 95
26234+
minimum: 50
26235+
type: integer
26236+
type: object
2622026237
tls:
2622126238
properties:
2622226239
allowInvalidCertificates:
@@ -26423,6 +26440,28 @@ spec:
2642326440
type: integer
2642426441
state:
2642526442
type: string
26443+
storageAutoscaling:
26444+
additionalProperties:
26445+
properties:
26446+
currentSize:
26447+
type: string
26448+
lastCheckTime:
26449+
format: date-time
26450+
type: string
26451+
lastError:
26452+
type: string
26453+
lastResizeTime:
26454+
format: date-time
26455+
type: string
26456+
lastUsagePercent:
26457+
type: integer
26458+
pvcName:
26459+
type: string
26460+
resizeCount:
26461+
format: int32
26462+
type: integer
26463+
type: object
26464+
type: object
2642626465
required:
2642726466
- ready
2642826467
- size
@@ -26536,6 +26575,13 @@ rules:
2653626575
- watch
2653726576
- create
2653826577
- patch
26578+
- apiGroups:
26579+
- metrics.k8s.io
26580+
resources:
26581+
- pods
26582+
verbs:
26583+
- get
26584+
- list
2653926585
- apiGroups:
2654026586
- certmanager.k8s.io
2654126587
- cert-manager.io
@@ -26612,7 +26658,7 @@ spec:
2661226658
serviceAccountName: percona-server-mongodb-operator
2661326659
containers:
2661426660
- name: percona-server-mongodb-operator
26615-
image: perconalab/percona-server-mongodb-operator:main
26661+
image: perconalab/percona-server-mongodb-operator:k8spsmdb-1472
2661626662
imagePullPolicy: Always
2661726663
livenessProbe:
2661826664
failureThreshold: 3

deploy/crd.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26217,6 +26217,23 @@ spec:
2621726217
required:
2621826218
- enabled
2621926219
type: object
26220+
storageAutoscaling:
26221+
properties:
26222+
enabled:
26223+
type: boolean
26224+
growthStepGi:
26225+
default: 2
26226+
format: int64
26227+
minimum: 1
26228+
type: integer
26229+
maxSize:
26230+
type: string
26231+
triggerThresholdPercent:
26232+
default: 80
26233+
maximum: 95
26234+
minimum: 50
26235+
type: integer
26236+
type: object
2622026237
tls:
2622126238
properties:
2622226239
allowInvalidCertificates:
@@ -26423,6 +26440,28 @@ spec:
2642326440
type: integer
2642426441
state:
2642526442
type: string
26443+
storageAutoscaling:
26444+
additionalProperties:
26445+
properties:
26446+
currentSize:
26447+
type: string
26448+
lastCheckTime:
26449+
format: date-time
26450+
type: string
26451+
lastError:
26452+
type: string
26453+
lastResizeTime:
26454+
format: date-time
26455+
type: string
26456+
lastUsagePercent:
26457+
type: integer
26458+
pvcName:
26459+
type: string
26460+
resizeCount:
26461+
format: int32
26462+
type: integer
26463+
type: object
26464+
type: object
2642626465
required:
2642726466
- ready
2642826467
- size

deploy/cw-bundle.yaml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26217,6 +26217,23 @@ spec:
2621726217
required:
2621826218
- enabled
2621926219
type: object
26220+
storageAutoscaling:
26221+
properties:
26222+
enabled:
26223+
type: boolean
26224+
growthStepGi:
26225+
default: 2
26226+
format: int64
26227+
minimum: 1
26228+
type: integer
26229+
maxSize:
26230+
type: string
26231+
triggerThresholdPercent:
26232+
default: 80
26233+
maximum: 95
26234+
minimum: 50
26235+
type: integer
26236+
type: object
2622026237
tls:
2622126238
properties:
2622226239
allowInvalidCertificates:
@@ -26423,6 +26440,28 @@ spec:
2642326440
type: integer
2642426441
state:
2642526442
type: string
26443+
storageAutoscaling:
26444+
additionalProperties:
26445+
properties:
26446+
currentSize:
26447+
type: string
26448+
lastCheckTime:
26449+
format: date-time
26450+
type: string
26451+
lastError:
26452+
type: string
26453+
lastResizeTime:
26454+
format: date-time
26455+
type: string
26456+
lastUsagePercent:
26457+
type: integer
26458+
pvcName:
26459+
type: string
26460+
resizeCount:
26461+
format: int32
26462+
type: integer
26463+
type: object
26464+
type: object
2642626465
required:
2642726466
- ready
2642826467
- size
@@ -26556,6 +26595,13 @@ rules:
2655626595
- watch
2655726596
- create
2655826597
- patch
26598+
- apiGroups:
26599+
- metrics.k8s.io
26600+
resources:
26601+
- pods
26602+
verbs:
26603+
- get
26604+
- list
2655926605
- apiGroups:
2656026606
- certmanager.k8s.io
2656126607
- cert-manager.io
@@ -26633,7 +26679,7 @@ spec:
2663326679
serviceAccountName: percona-server-mongodb-operator
2663426680
containers:
2663526681
- name: percona-server-mongodb-operator
26636-
image: perconalab/percona-server-mongodb-operator:main
26682+
image: perconalab/percona-server-mongodb-operator:k8spsmdb-1472
2663726683
imagePullPolicy: Always
2663826684
livenessProbe:
2663926685
failureThreshold: 3

deploy/cw-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
serviceAccountName: percona-server-mongodb-operator
2626
containers:
2727
- name: percona-server-mongodb-operator
28-
image: perconalab/percona-server-mongodb-operator:main
28+
image: perconalab/percona-server-mongodb-operator:k8spsmdb-1472
2929
imagePullPolicy: Always
3030
livenessProbe:
3131
failureThreshold: 3

deploy/cw-rbac.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ rules:
121121
- watch
122122
- create
123123
- patch
124+
- apiGroups:
125+
- metrics.k8s.io
126+
resources:
127+
- pods
128+
verbs:
129+
- get
130+
- list
124131
- apiGroups:
125132
- certmanager.k8s.io
126133
- cert-manager.io

deploy/operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
serviceAccountName: percona-server-mongodb-operator
2626
containers:
2727
- name: percona-server-mongodb-operator
28-
image: perconalab/percona-server-mongodb-operator:main
28+
image: perconalab/percona-server-mongodb-operator:k8spsmdb-1472
2929
imagePullPolicy: Always
3030
livenessProbe:
3131
failureThreshold: 3

deploy/rbac.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ rules:
101101
- watch
102102
- create
103103
- patch
104+
- apiGroups:
105+
- metrics.k8s.io
106+
resources:
107+
- pods
108+
verbs:
109+
- get
110+
- list
104111
- apiGroups:
105112
- certmanager.k8s.io
106113
- cert-manager.io

e2e-tests/version-service/conf/crd.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26217,6 +26217,23 @@ spec:
2621726217
required:
2621826218
- enabled
2621926219
type: object
26220+
storageAutoscaling:
26221+
properties:
26222+
enabled:
26223+
type: boolean
26224+
growthStepGi:
26225+
default: 2
26226+
format: int64
26227+
minimum: 1
26228+
type: integer
26229+
maxSize:
26230+
type: string
26231+
triggerThresholdPercent:
26232+
default: 80
26233+
maximum: 95
26234+
minimum: 50
26235+
type: integer
26236+
type: object
2622026237
tls:
2622126238
properties:
2622226239
allowInvalidCertificates:
@@ -26423,6 +26440,28 @@ spec:
2642326440
type: integer
2642426441
state:
2642526442
type: string
26443+
storageAutoscaling:
26444+
additionalProperties:
26445+
properties:
26446+
currentSize:
26447+
type: string
26448+
lastCheckTime:
26449+
format: date-time
26450+
type: string
26451+
lastError:
26452+
type: string
26453+
lastResizeTime:
26454+
format: date-time
26455+
type: string
26456+
lastUsagePercent:
26457+
type: integer
26458+
pvcName:
26459+
type: string
26460+
resizeCount:
26461+
format: int32
26462+
type: integer
26463+
type: object
26464+
type: object
2642626465
required:
2642726466
- ready
2642826467
- size

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ require (
3434
k8s.io/apiextensions-apiserver v0.35.0
3535
k8s.io/apimachinery v0.35.0
3636
k8s.io/client-go v0.35.0
37+
k8s.io/metrics v0.35.0
3738
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4
3839
sigs.k8s.io/controller-runtime v0.22.4
3940
sigs.k8s.io/mcs-api v0.3.0

0 commit comments

Comments
 (0)