Skip to content

Commit b3fdb3d

Browse files
committed
small fixes
1 parent a4d6c96 commit b3fdb3d

File tree

3 files changed

+38
-33
lines changed

3 files changed

+38
-33
lines changed

cmd/example-gen/generate.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ del_fields_to_comment() {
133133
| yq "del(.spec.proxy.router.serviceAccountName)" \
134134
| yq "del(.spec.proxy.router.imagePullSecrets)" \
135135
| yq "del(.spec.proxy.router.podDisruptionBudget.minAvailable)" \
136-
| yq "del(.spec.proxy.router.resources.limits)" \
137136
| yq "del(.spec.proxy.router.env)" \
138137
| yq "del(.spec.proxy.router.envFrom)" \
139138
| yq "del(.spec.proxy.router.startupProbe)" \
@@ -157,7 +156,6 @@ del_fields_to_comment() {
157156
| yq "del(.spec.orchestrator.serviceAccountName)" \
158157
| yq "del(.spec.orchestrator.imagePullSecrets)" \
159158
| yq "del(.spec.orchestrator.podDisruptionBudget.minAvailable)" \
160-
| yq "del(.spec.orchestrator.resources.limits)" \
161159
| yq "del(.spec.orchestrator.env)" \
162160
| yq "del(.spec.orchestrator.envFrom)" \
163161
| yq "del(.spec.orchestrator.startupProbe)" \
@@ -173,12 +171,14 @@ del_fields_to_comment() {
173171
| yq "del(.spec.pmm.readinessProbes)" \
174172
| yq "del(.spec.pmm.livenessProbes)" \
175173
| yq "del(.spec.pmm.containerSecurityContext)" \
174+
| yq "del(.spec.pmm.resources.limits)" \
176175
| yq "del(.spec.backup.sourcePod)" \
177176
| yq "del(.spec.backup.schedule)" \
178177
| yq "del(.spec.backup.backoffLimit)" \
179178
| yq "del(.spec.backup.imagePullSecrets)" \
180179
| yq "del(.spec.backup.initContainer)" \
181180
| yq "del(.spec.backup.containerSecurityContext)" \
181+
| yq "del(.spec.backup.resources)" \
182182
| yq "del(.spec.backup.storages.azure-blob)" \
183183
| yq "del(.spec.backup.storages.s3-us-west.resources)" \
184184
| yq "del(.spec.backup.storages.s3-us-west.topologySpreadConstraints)" \
@@ -191,6 +191,11 @@ del_fields_to_comment() {
191191
| yq "del(.spec.backup.storages.s3-us-west.annotations)" \
192192
| yq "del(.spec.backup.storages.s3-us-west.containerOptions)" \
193193
| yq "del(.spec.backup.storages.s3-us-west.volumeSpec)" \
194+
| yq "del(.spec.backup.storages.s3-us-west.affinity)" \
195+
| yq "del(.spec.backup.storages.s3-us-west.s3.prefix)" \
196+
| yq "del(.spec.backup.storages.s3-us-west.s3.endpointUrl)" \
197+
| yq "del(.spec.backup.storages.s3-us-west.schedulerName)" \
198+
| yq "del(.spec.backup.storages.s3-us-west.runtimeClassName)" \
194199
| yq "del(.spec.toolkit.imagePullSecrets)" \
195200
| yq "del(.spec.toolkit.env)" \
196201
| yq "del(.spec.toolkit.envFrom)" \

cmd/example-gen/internal/fill/defaults.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func SetDefaults(cr *apiv1.PerconaServerMySQL) {
1818
Orchestrator: false,
1919
OrchestratorSize: false,
2020
}
21-
cr.Spec.Pause = true
21+
cr.Spec.Pause = false
2222
cr.Spec.CRVersion = version.Version()
2323
cr.Spec.VolumeExpansionEnabled = true
2424
cr.Spec.UpdateStrategy = "SmartUpdate"
@@ -228,7 +228,7 @@ frontend stats
228228
}
229229

230230
func routerDefaults(spec *apiv1.MySQLRouterSpec) {
231-
spec.Enabled = true
231+
spec.Enabled = false
232232
spec.Size = 3
233233
spec.Image = "perconalab/percona-server-mysql-operator:main-router8.4"
234234
spec.RuntimeClassName = ptr.To("image-rc")
@@ -316,7 +316,7 @@ level=DEBUG`
316316
}
317317

318318
func orchestratorDefaults(spec *apiv1.OrchestratorSpec) {
319-
spec.Enabled = true
319+
spec.Enabled = false
320320
spec.Image = "perconalab/percona-server-mysql-operator:main-orchestrator"
321321
spec.Size = 3
322322
spec.TerminationGracePeriodSeconds = ptr.To(int64(30))

deploy/cr.yaml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ spec:
445445
maxUnavailable: 1
446446
# minAvailable: 0
447447
resources:
448-
# limits:
449-
# memory: 256M
448+
limits:
449+
memory: 256M
450450
requests:
451451
memory: 256M
452452
# startupProbe:
@@ -586,8 +586,8 @@ spec:
586586
maxUnavailable: 1
587587
# minAvailable: 0
588588
resources:
589-
# limits:
590-
# memory: 256M
589+
limits:
590+
memory: 256M
591591
requests:
592592
memory: 128M
593593
# startupProbe:
@@ -643,9 +643,9 @@ spec:
643643
# runAsGroup: 1001
644644
# runAsUser: 1001
645645
resources:
646-
limits:
647-
cpu: 400m
648-
memory: 256M
646+
# limits:
647+
# cpu: 400m
648+
# memory: 256M
649649
requests:
650650
cpu: 300m
651651
memory: 150M
@@ -697,13 +697,13 @@ spec:
697697
# privileged: false
698698
# runAsGroup: 1001
699699
# runAsUser: 1001
700-
resources:
701-
limits:
702-
cpu: 100m
703-
memory: 100M
704-
requests:
705-
cpu: 200m
706-
memory: 200M
700+
# resources:
701+
# limits:
702+
# cpu: 100m
703+
# memory: 100M
704+
# requests:
705+
# cpu: 200m
706+
# memory: 200M
707707
storages:
708708
# azure-blob:
709709
# azure:
@@ -755,16 +755,16 @@ spec:
755755
# type: azure
756756
# verifyTLS: null
757757
s3-us-west:
758-
affinity:
759-
nodeAffinity:
760-
requiredDuringSchedulingIgnoredDuringExecution:
761-
nodeSelectorTerms:
762-
- matchExpressions:
763-
- key: kubernetes.io/e2e-az-name
764-
operator: In
765-
values:
766-
- e2e-az1
767-
- e2e-az2
758+
# affinity:
759+
# nodeAffinity:
760+
# requiredDuringSchedulingIgnoredDuringExecution:
761+
# nodeSelectorTerms:
762+
# - matchExpressions:
763+
# - key: kubernetes.io/e2e-az-name
764+
# operator: In
765+
# values:
766+
# - e2e-az1
767+
# - e2e-az2
768768
# annotations:
769769
# testName: scheduled-backup
770770
# containerOptions:
@@ -800,14 +800,14 @@ spec:
800800
# requests:
801801
# cpu: 200m
802802
# memory: 200M
803-
runtimeClassName: image-rc
803+
# runtimeClassName: image-rc
804804
s3:
805805
bucket: S3-BACKUP-BUCKET-NAME-HERE
806806
credentialsSecret: ps-cluster1-s3-credentials
807-
endpointUrl: https://s3.amazonaws.com
808-
prefix: PREFIX_NAME
807+
# endpointUrl: https://s3.amazonaws.com
808+
# prefix: PREFIX_NAME
809809
region: us-west-2
810-
schedulerName: default-scheduler
810+
# schedulerName: default-scheduler
811811
# tolerations:
812812
# - effect: NoExecute
813813
# key: node.alpha.kubernetes.io/unreachable

0 commit comments

Comments
 (0)