Skip to content
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ undeploy: manifests ## Undeploy operator

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.3)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.18.0)

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
Expand Down
5 changes: 3 additions & 2 deletions api/v1alpha1/perconaservermysql_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ type PodSpec struct {
SchedulerName string `json:"schedulerName,omitempty"`
RuntimeClassName *string `json:"runtimeClassName,omitempty"`

PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`

Configuration string `json:"configuration,omitempty"`

Expand Down
7 changes: 6 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.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 @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.18.0
name: perconaservermysqlbackups.ps.percona.com
spec:
group: ps.percona.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.18.0
name: perconaservermysqlrestores.ps.percona.com
spec:
group: ps.percona.com
Expand Down
67 changes: 66 additions & 1 deletion config/crd/bases/ps.percona.com_perconaservermysqls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.18.0
name: perconaservermysqls.ps.percona.com
spec:
group: ps.percona.com
Expand Down Expand Up @@ -877,6 +877,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -3110,6 +3123,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -5888,6 +5914,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -7227,6 +7266,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -8442,6 +8494,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down
10 changes: 10 additions & 0 deletions config/rbac/cluster/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ rules:
- list
- patch
- watch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- get
- list
- patch
- update
- apiGroups:
- ps.percona.com
resources:
Expand Down
10 changes: 10 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ rules:
- list
- patch
- watch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- get
- list
- patch
- update
- apiGroups:
- ps.percona.com
resources:
Expand Down
81 changes: 78 additions & 3 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.18.0
labels:
app.kubernetes.io/component: crd
app.kubernetes.io/name: percona-server-crd
Expand Down Expand Up @@ -962,7 +962,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.18.0
labels:
app.kubernetes.io/component: crd
app.kubernetes.io/name: percona-server-crd
Expand Down Expand Up @@ -1921,7 +1921,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.3
controller-gen.kubebuilder.io/version: v0.18.0
labels:
app.kubernetes.io/component: crd
app.kubernetes.io/name: percona-server-crd
Expand Down Expand Up @@ -2800,6 +2800,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -5033,6 +5046,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -7811,6 +7837,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -9150,6 +9189,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -10365,6 +10417,19 @@ spec:
additionalProperties:
type: string
type: object
podDisruptionBudget:
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
type: object
podSecurityContext:
properties:
appArmorProfile:
Expand Down Expand Up @@ -11641,6 +11706,16 @@ rules:
- list
- patch
- watch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- get
- list
- patch
- update
- apiGroups:
- ps.percona.com
resources:
Expand Down
12 changes: 12 additions & 0 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
# env:
# - name: BOOTSTRAP_READ_TIMEOUT
# value: "600"
podDisruptionBudget:
maxUnavailable: 1
# minAvailable: 0
resources:
requests:
memory: 2G
Expand Down Expand Up @@ -190,6 +193,9 @@ spec:
# - name: "my-secret-1"
# - name: "my-secret-2"

podDisruptionBudget:
maxUnavailable: 1
# minAvailable: 0
resources:
requests:
memory: 1G
Expand Down Expand Up @@ -339,6 +345,9 @@ spec:

size: 3

podDisruptionBudget:
maxUnavailable: 1
# minAvailable: 0
resources:
requests:
memory: 256M
Expand Down Expand Up @@ -436,6 +445,9 @@ spec:
# loadBalancerSourceRanges:
# - 10.0.0.0/8

podDisruptionBudget:
maxUnavailable: 1
# minAvailable: 0
gracePeriod: 30

resources:
Expand Down
Loading
Loading