Skip to content

Commit add9cd9

Browse files
authored
K8SPSMDB-951: Custom PBM config (#1490)
1 parent faea6aa commit add9cd9

File tree

12 files changed

+601
-4
lines changed

12 files changed

+601
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ help: ## Display this help.
1111
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
1212

1313
generate: controller-gen ## Generate CRDs and RBAC files
14-
$(CONTROLLER_GEN) crd:maxDescLen=0 rbac:roleName=$(NAME) webhook paths="./..." output:crd:artifacts:config=config/crd/bases ## Generate WebhookConfiguration, Role and CustomResourceDefinition objects.
14+
$(CONTROLLER_GEN) crd:maxDescLen=0,allowDangerousTypes=true rbac:roleName=$(NAME) webhook paths="./..." output:crd:artifacts:config=config/crd/bases ## Generate WebhookConfiguration, Role and CustomResourceDefinition objects.
1515
$(CONTROLLER_GEN) object paths="./..." ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
1616

1717
$(DEPLOYDIR)/crd.yaml: kustomize generate

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ spec:
119119
type: string
120120
credentialsSecret:
121121
type: string
122+
debugLogLevels:
123+
type: string
122124
endpointUrl:
123125
type: string
126+
forcePathStyle:
127+
type: boolean
124128
insecureSkipTLSVerify:
125129
type: boolean
126130
maxUploadParts:
@@ -129,6 +133,15 @@ spec:
129133
type: string
130134
region:
131135
type: string
136+
retryer:
137+
properties:
138+
maxRetryDelay:
139+
type: string
140+
minRetryDelay:
141+
type: string
142+
numMaxRetries:
143+
type: integer
144+
type: object
132145
serverSideEncryption:
133146
properties:
134147
kmsKeyID:

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,12 @@ spec:
8989
type: string
9090
credentialsSecret:
9191
type: string
92+
debugLogLevels:
93+
type: string
9294
endpointUrl:
9395
type: string
96+
forcePathStyle:
97+
type: boolean
9498
insecureSkipTLSVerify:
9599
type: boolean
96100
maxUploadParts:
@@ -99,6 +103,15 @@ spec:
99103
type: string
100104
region:
101105
type: string
106+
retryer:
107+
properties:
108+
maxRetryDelay:
109+
type: string
110+
minRetryDelay:
111+
type: string
112+
numMaxRetries:
113+
type: integer
114+
type: object
102115
serverSideEncryption:
103116
properties:
104117
kmsKeyID:

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

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,45 @@ spec:
4646
additionalProperties:
4747
type: string
4848
type: object
49+
configuration:
50+
properties:
51+
backupOptions:
52+
properties:
53+
oplogSpanMin:
54+
type: number
55+
priority:
56+
additionalProperties:
57+
type: string
58+
type: object
59+
timeouts:
60+
properties:
61+
startingStatus:
62+
format: int32
63+
type: integer
64+
type: object
65+
required:
66+
- oplogSpanMin
67+
type: object
68+
restoreOptions:
69+
properties:
70+
batchSize:
71+
type: integer
72+
downloadChunkMb:
73+
type: integer
74+
maxDownloadBufferMb:
75+
type: integer
76+
mongodLocation:
77+
type: string
78+
mongodLocationMap:
79+
additionalProperties:
80+
type: string
81+
type: object
82+
numDownloadWorkers:
83+
type: integer
84+
numInsertionWorkers:
85+
type: integer
86+
type: object
87+
type: object
4988
containerSecurityContext:
5089
properties:
5190
allowPrivilegeEscalation:
@@ -249,8 +288,12 @@ spec:
249288
type: string
250289
credentialsSecret:
251290
type: string
291+
debugLogLevels:
292+
type: string
252293
endpointUrl:
253294
type: string
295+
forcePathStyle:
296+
type: boolean
254297
insecureSkipTLSVerify:
255298
type: boolean
256299
maxUploadParts:
@@ -259,6 +302,15 @@ spec:
259302
type: string
260303
region:
261304
type: string
305+
retryer:
306+
properties:
307+
maxRetryDelay:
308+
type: string
309+
minRetryDelay:
310+
type: string
311+
numMaxRetries:
312+
type: integer
313+
type: object
262314
serverSideEncryption:
263315
properties:
264316
kmsKeyID:

deploy/bundle.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,12 @@ spec:
118118
type: string
119119
credentialsSecret:
120120
type: string
121+
debugLogLevels:
122+
type: string
121123
endpointUrl:
122124
type: string
125+
forcePathStyle:
126+
type: boolean
123127
insecureSkipTLSVerify:
124128
type: boolean
125129
maxUploadParts:
@@ -128,6 +132,15 @@ spec:
128132
type: string
129133
region:
130134
type: string
135+
retryer:
136+
properties:
137+
maxRetryDelay:
138+
type: string
139+
minRetryDelay:
140+
type: string
141+
numMaxRetries:
142+
type: integer
143+
type: object
131144
serverSideEncryption:
132145
properties:
133146
kmsKeyID:
@@ -252,8 +265,12 @@ spec:
252265
type: string
253266
credentialsSecret:
254267
type: string
268+
debugLogLevels:
269+
type: string
255270
endpointUrl:
256271
type: string
272+
forcePathStyle:
273+
type: boolean
257274
insecureSkipTLSVerify:
258275
type: boolean
259276
maxUploadParts:
@@ -262,6 +279,15 @@ spec:
262279
type: string
263280
region:
264281
type: string
282+
retryer:
283+
properties:
284+
maxRetryDelay:
285+
type: string
286+
minRetryDelay:
287+
type: string
288+
numMaxRetries:
289+
type: integer
290+
type: object
265291
serverSideEncryption:
266292
properties:
267293
kmsKeyID:
@@ -693,6 +719,45 @@ spec:
693719
additionalProperties:
694720
type: string
695721
type: object
722+
configuration:
723+
properties:
724+
backupOptions:
725+
properties:
726+
oplogSpanMin:
727+
type: number
728+
priority:
729+
additionalProperties:
730+
type: string
731+
type: object
732+
timeouts:
733+
properties:
734+
startingStatus:
735+
format: int32
736+
type: integer
737+
type: object
738+
required:
739+
- oplogSpanMin
740+
type: object
741+
restoreOptions:
742+
properties:
743+
batchSize:
744+
type: integer
745+
downloadChunkMb:
746+
type: integer
747+
maxDownloadBufferMb:
748+
type: integer
749+
mongodLocation:
750+
type: string
751+
mongodLocationMap:
752+
additionalProperties:
753+
type: string
754+
type: object
755+
numDownloadWorkers:
756+
type: integer
757+
numInsertionWorkers:
758+
type: integer
759+
type: object
760+
type: object
696761
containerSecurityContext:
697762
properties:
698763
allowPrivilegeEscalation:
@@ -896,8 +961,12 @@ spec:
896961
type: string
897962
credentialsSecret:
898963
type: string
964+
debugLogLevels:
965+
type: string
899966
endpointUrl:
900967
type: string
968+
forcePathStyle:
969+
type: boolean
901970
insecureSkipTLSVerify:
902971
type: boolean
903972
maxUploadParts:
@@ -906,6 +975,15 @@ spec:
906975
type: string
907976
region:
908977
type: string
978+
retryer:
979+
properties:
980+
maxRetryDelay:
981+
type: string
982+
minRetryDelay:
983+
type: string
984+
numMaxRetries:
985+
type: integer
986+
type: object
909987
serverSideEncryption:
910988
properties:
911989
kmsKeyID:

deploy/cr.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,10 @@ spec:
528528
# sseAlgorithm: aws:kms
529529
# sseCustomerAlgorithm: AES256
530530
# sseCustomerKey: Y3VzdG9tZXIta2V5
531+
# retryer:
532+
# numMaxRetries: 3
533+
# minRetryDelay: 30
534+
# maxRetryDelay: 5
531535
# region: us-west-2
532536
# prefix: ""
533537
# uploadPartSize: 10485760
@@ -556,6 +560,25 @@ spec:
556560
# oplogSpanMin: 10
557561
compressionType: gzip
558562
compressionLevel: 6
563+
# backup:
564+
# priority:
565+
# "localhost:28019": 2.5
566+
# "localhost:27018": 2.5
567+
# compression: gzip
568+
# compressionLevel: 0
569+
# timeouts:
570+
# startingStatus: 33
571+
# oplogSpanMin:
572+
# restore:
573+
# batchSize: 500
574+
# numInsertionWorkers: 10
575+
# numDownloadWorkers: 4
576+
# maxDownloadBufferMb: 0
577+
# downloadChunkMb: 32
578+
# mongodLocation: /usr/bin/mongo
579+
# mongodLocationMap:
580+
# "node01:2017": /usr/bin/mongo
581+
# "node03:27017": /usr/bin/mongo
559582
# tasks:
560583
# - name: daily-s3-us-west
561584
# enabled: true

0 commit comments

Comments
 (0)