Skip to content

Commit 8790e85

Browse files
committed
K8SPSMDB-1107 - Update upgrade-consistency tests for 1.16.1 release
1 parent d9be178 commit 8790e85

11 files changed

+1459
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
annotations: {}
5+
labels:
6+
app.kubernetes.io/instance: some-name
7+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
8+
app.kubernetes.io/name: percona-server-mongodb
9+
app.kubernetes.io/part-of: percona-server-mongodb
10+
app.kubernetes.io/replset: cfg
11+
name: some-name-cfg
12+
ownerReferences:
13+
- controller: true
14+
kind: PerconaServerMongoDB
15+
name: some-name
16+
spec:
17+
ports:
18+
- name: mongodb
19+
port: 27017
20+
protocol: TCP
21+
targetPort: 27017
22+
selector:
23+
app.kubernetes.io/instance: some-name
24+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
25+
app.kubernetes.io/name: percona-server-mongodb
26+
app.kubernetes.io/part-of: percona-server-mongodb
27+
app.kubernetes.io/replset: cfg
28+
sessionAffinity: None
29+
type: ClusterIP
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
annotations: {}
5+
labels:
6+
app.kubernetes.io/instance: some-name
7+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
8+
app.kubernetes.io/name: percona-server-mongodb
9+
app.kubernetes.io/part-of: percona-server-mongodb
10+
app.kubernetes.io/replset: rs0
11+
name: some-name-rs0
12+
ownerReferences:
13+
- controller: true
14+
kind: PerconaServerMongoDB
15+
name: some-name
16+
spec:
17+
ports:
18+
- name: mongodb
19+
port: 27017
20+
protocol: TCP
21+
targetPort: 27017
22+
selector:
23+
app.kubernetes.io/instance: some-name
24+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
25+
app.kubernetes.io/name: percona-server-mongodb
26+
app.kubernetes.io/part-of: percona-server-mongodb
27+
app.kubernetes.io/replset: rs0
28+
sessionAffinity: None
29+
type: ClusterIP
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
annotations: {}
5+
generation: 11
6+
labels:
7+
app.kubernetes.io/component: cfg
8+
app.kubernetes.io/instance: some-name
9+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
10+
app.kubernetes.io/name: percona-server-mongodb
11+
app.kubernetes.io/part-of: percona-server-mongodb
12+
app.kubernetes.io/replset: cfg
13+
name: some-name-cfg
14+
ownerReferences:
15+
- controller: true
16+
kind: PerconaServerMongoDB
17+
name: some-name
18+
spec:
19+
podManagementPolicy: OrderedReady
20+
replicas: 3
21+
revisionHistoryLimit: 10
22+
selector:
23+
matchLabels:
24+
app.kubernetes.io/component: cfg
25+
app.kubernetes.io/instance: some-name
26+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
27+
app.kubernetes.io/name: percona-server-mongodb
28+
app.kubernetes.io/part-of: percona-server-mongodb
29+
app.kubernetes.io/replset: cfg
30+
serviceName: some-name-cfg
31+
template:
32+
metadata:
33+
annotations: {}
34+
labels:
35+
app.kubernetes.io/component: cfg
36+
app.kubernetes.io/instance: some-name
37+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
38+
app.kubernetes.io/name: percona-server-mongodb
39+
app.kubernetes.io/part-of: percona-server-mongodb
40+
app.kubernetes.io/replset: cfg
41+
spec:
42+
affinity:
43+
podAntiAffinity:
44+
requiredDuringSchedulingIgnoredDuringExecution:
45+
- labelSelector:
46+
matchLabels:
47+
app.kubernetes.io/component: cfg
48+
app.kubernetes.io/instance: some-name
49+
app.kubernetes.io/managed-by: percona-server-mongodb-operator
50+
app.kubernetes.io/name: percona-server-mongodb
51+
app.kubernetes.io/part-of: percona-server-mongodb
52+
app.kubernetes.io/replset: cfg
53+
topologyKey: kubernetes.io/hostname
54+
containers:
55+
- args:
56+
- --bind_ip_all
57+
- --auth
58+
- --dbpath=/data/db
59+
- --port=27017
60+
- --replSet=cfg
61+
- --storageEngine=wiredTiger
62+
- --relaxPermChecks
63+
- --sslAllowInvalidCertificates
64+
- --clusterAuthMode=x509
65+
- --tlsMode=preferTLS
66+
- --configsvr
67+
- --enableEncryption
68+
- --encryptionKeyFile=/etc/mongodb-encryption/encryption-key
69+
- --wiredTigerCacheSizeGB=0.25
70+
- --wiredTigerIndexPrefixCompression=true
71+
- --quiet
72+
command:
73+
- /opt/percona/ps-entry.sh
74+
env:
75+
- name: SERVICE_NAME
76+
value: some-name
77+
- name: MONGODB_PORT
78+
value: "27017"
79+
- name: MONGODB_REPLSET
80+
value: cfg
81+
envFrom:
82+
- secretRef:
83+
name: internal-some-name-users
84+
optional: false
85+
imagePullPolicy: Always
86+
livenessProbe:
87+
exec:
88+
command:
89+
- /opt/percona/mongodb-healthcheck
90+
- k8s
91+
- liveness
92+
- --ssl
93+
- --sslInsecure
94+
- --sslCAFile
95+
- /etc/mongodb-ssl/ca.crt
96+
- --sslPEMKeyFile
97+
- /tmp/tls.pem
98+
- --startupDelaySeconds
99+
- "7200"
100+
failureThreshold: 4
101+
initialDelaySeconds: 60
102+
periodSeconds: 30
103+
successThreshold: 1
104+
timeoutSeconds: 10
105+
name: mongod
106+
ports:
107+
- containerPort: 27017
108+
name: mongodb
109+
protocol: TCP
110+
readinessProbe:
111+
exec:
112+
command:
113+
- /opt/percona/mongodb-healthcheck
114+
- k8s
115+
- readiness
116+
- --component
117+
- mongod
118+
failureThreshold: 3
119+
initialDelaySeconds: 10
120+
periodSeconds: 3
121+
successThreshold: 1
122+
timeoutSeconds: 2
123+
resources:
124+
limits:
125+
cpu: 300m
126+
memory: 500M
127+
requests:
128+
cpu: 300m
129+
memory: 500M
130+
securityContext:
131+
runAsNonRoot: true
132+
terminationMessagePath: /dev/termination-log
133+
terminationMessagePolicy: File
134+
volumeMounts:
135+
- mountPath: /data/db
136+
name: mongod-data
137+
- mountPath: /etc/mongodb-secrets
138+
name: some-name-mongodb-keyfile
139+
readOnly: true
140+
- mountPath: /etc/mongodb-ssl
141+
name: ssl
142+
readOnly: true
143+
- mountPath: /etc/mongodb-ssl-internal
144+
name: ssl-internal
145+
readOnly: true
146+
- mountPath: /opt/percona
147+
name: bin
148+
- mountPath: /etc/mongodb-encryption
149+
name: some-name-mongodb-encryption-key
150+
readOnly: true
151+
- mountPath: /etc/users-secret
152+
name: users-secret-file
153+
workingDir: /data/db
154+
dnsPolicy: ClusterFirst
155+
initContainers:
156+
- command:
157+
- /init-entrypoint.sh
158+
imagePullPolicy: Always
159+
name: mongo-init
160+
resources:
161+
limits:
162+
cpu: 300m
163+
memory: 500M
164+
requests:
165+
cpu: 300m
166+
memory: 500M
167+
terminationMessagePath: /dev/termination-log
168+
terminationMessagePolicy: File
169+
volumeMounts:
170+
- mountPath: /data/db
171+
name: mongod-data
172+
- mountPath: /opt/percona
173+
name: bin
174+
restartPolicy: Always
175+
schedulerName: default-scheduler
176+
securityContext: {}
177+
serviceAccount: default
178+
serviceAccountName: default
179+
terminationGracePeriodSeconds: 60
180+
volumes:
181+
- name: some-name-mongodb-keyfile
182+
secret:
183+
defaultMode: 288
184+
optional: false
185+
secretName: some-name-mongodb-keyfile
186+
- emptyDir: {}
187+
name: bin
188+
- name: some-name-mongodb-encryption-key
189+
secret:
190+
defaultMode: 288
191+
optional: false
192+
secretName: some-name-mongodb-encryption-key
193+
- name: ssl
194+
secret:
195+
defaultMode: 288
196+
optional: false
197+
secretName: some-name-ssl
198+
- name: ssl-internal
199+
secret:
200+
defaultMode: 288
201+
optional: true
202+
secretName: some-name-ssl-internal
203+
- name: users-secret-file
204+
secret:
205+
defaultMode: 420
206+
secretName: internal-some-name-users
207+
updateStrategy:
208+
type: OnDelete
209+
volumeClaimTemplates:
210+
- metadata:
211+
name: mongod-data
212+
spec:
213+
accessModes:
214+
- ReadWriteOnce
215+
resources:
216+
requests:
217+
storage: 3Gi
218+
status:
219+
phase: Pending

0 commit comments

Comments
 (0)