Skip to content

Commit bb4af02

Browse files
gkechhors
andauthored
K8SPSMDB-297 fix broken e2e test default cr (#1957)
Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
1 parent 13cee14 commit bb4af02

File tree

4 files changed

+264
-0
lines changed

4 files changed

+264
-0
lines changed

e2e-tests/default-cr/compare/statefulset_my-cluster-name-cfg-oc.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ spec:
6666
value: "27017"
6767
- name: MONGODB_REPLSET
6868
value: cfg
69+
- name: LOGCOLLECTOR_ENABLED
70+
value: "true"
6971
envFrom:
7072
- secretRef:
7173
name: internal-my-cluster-name-users
@@ -191,6 +193,70 @@ spec:
191193
readOnly: true
192194
- mountPath: /data/db
193195
name: mongod-data
196+
- args:
197+
- fluent-bit
198+
command:
199+
- /opt/percona/logcollector/entrypoint.sh
200+
env:
201+
- name: LOG_DATA_DIR
202+
value: /data/db/logs
203+
- name: POD_NAMESPACE
204+
valueFrom:
205+
fieldRef:
206+
apiVersion: v1
207+
fieldPath: metadata.namespace
208+
- name: POD_NAME
209+
valueFrom:
210+
fieldRef:
211+
apiVersion: v1
212+
fieldPath: metadata.name
213+
imagePullPolicy: IfNotPresent
214+
name: logs
215+
resources:
216+
requests:
217+
cpu: 200m
218+
memory: 100M
219+
terminationMessagePath: /dev/termination-log
220+
terminationMessagePolicy: File
221+
volumeMounts:
222+
- mountPath: /data/db
223+
name: mongod-data
224+
- mountPath: /opt/percona
225+
name: bin
226+
- args:
227+
- logrotate
228+
command:
229+
- /opt/percona/logcollector/entrypoint.sh
230+
env:
231+
- name: MONGODB_HOST
232+
value: localhost
233+
- name: MONGODB_PORT
234+
value: "27017"
235+
- name: MONGODB_USER
236+
valueFrom:
237+
secretKeyRef:
238+
key: MONGODB_CLUSTER_ADMIN_USER_ESCAPED
239+
name: internal-my-cluster-name-users
240+
optional: false
241+
- name: MONGODB_PASSWORD
242+
valueFrom:
243+
secretKeyRef:
244+
key: MONGODB_CLUSTER_ADMIN_PASSWORD_ESCAPED
245+
name: internal-my-cluster-name-users
246+
optional: false
247+
imagePullPolicy: IfNotPresent
248+
name: logrotate
249+
resources:
250+
requests:
251+
cpu: 200m
252+
memory: 100M
253+
terminationMessagePath: /dev/termination-log
254+
terminationMessagePolicy: File
255+
volumeMounts:
256+
- mountPath: /data/db
257+
name: mongod-data
258+
- mountPath: /opt/percona
259+
name: bin
194260
dnsPolicy: ClusterFirst
195261
initContainers:
196262
- command:

e2e-tests/default-cr/compare/statefulset_my-cluster-name-cfg.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ spec:
6666
value: "27017"
6767
- name: MONGODB_REPLSET
6868
value: cfg
69+
- name: LOGCOLLECTOR_ENABLED
70+
value: "true"
6971
envFrom:
7072
- secretRef:
7173
name: internal-my-cluster-name-users
@@ -193,6 +195,70 @@ spec:
193195
readOnly: true
194196
- mountPath: /data/db
195197
name: mongod-data
198+
- args:
199+
- fluent-bit
200+
command:
201+
- /opt/percona/logcollector/entrypoint.sh
202+
env:
203+
- name: LOG_DATA_DIR
204+
value: /data/db/logs
205+
- name: POD_NAMESPACE
206+
valueFrom:
207+
fieldRef:
208+
apiVersion: v1
209+
fieldPath: metadata.namespace
210+
- name: POD_NAME
211+
valueFrom:
212+
fieldRef:
213+
apiVersion: v1
214+
fieldPath: metadata.name
215+
imagePullPolicy: IfNotPresent
216+
name: logs
217+
resources:
218+
requests:
219+
cpu: 200m
220+
memory: 100M
221+
terminationMessagePath: /dev/termination-log
222+
terminationMessagePolicy: File
223+
volumeMounts:
224+
- mountPath: /data/db
225+
name: mongod-data
226+
- mountPath: /opt/percona
227+
name: bin
228+
- args:
229+
- logrotate
230+
command:
231+
- /opt/percona/logcollector/entrypoint.sh
232+
env:
233+
- name: MONGODB_HOST
234+
value: localhost
235+
- name: MONGODB_PORT
236+
value: "27017"
237+
- name: MONGODB_USER
238+
valueFrom:
239+
secretKeyRef:
240+
key: MONGODB_CLUSTER_ADMIN_USER_ESCAPED
241+
name: internal-my-cluster-name-users
242+
optional: false
243+
- name: MONGODB_PASSWORD
244+
valueFrom:
245+
secretKeyRef:
246+
key: MONGODB_CLUSTER_ADMIN_PASSWORD_ESCAPED
247+
name: internal-my-cluster-name-users
248+
optional: false
249+
imagePullPolicy: IfNotPresent
250+
name: logrotate
251+
resources:
252+
requests:
253+
cpu: 200m
254+
memory: 100M
255+
terminationMessagePath: /dev/termination-log
256+
terminationMessagePolicy: File
257+
volumeMounts:
258+
- mountPath: /data/db
259+
name: mongod-data
260+
- mountPath: /opt/percona
261+
name: bin
196262
dnsPolicy: ClusterFirst
197263
initContainers:
198264
- command:

e2e-tests/default-cr/compare/statefulset_my-cluster-name-rs0-oc.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ spec:
6666
value: "27017"
6767
- name: MONGODB_REPLSET
6868
value: rs0
69+
- name: LOGCOLLECTOR_ENABLED
70+
value: "true"
6971
envFrom:
7072
- secretRef:
7173
name: internal-my-cluster-name-users
@@ -191,6 +193,70 @@ spec:
191193
readOnly: true
192194
- mountPath: /data/db
193195
name: mongod-data
196+
- args:
197+
- fluent-bit
198+
command:
199+
- /opt/percona/logcollector/entrypoint.sh
200+
env:
201+
- name: LOG_DATA_DIR
202+
value: /data/db/logs
203+
- name: POD_NAMESPACE
204+
valueFrom:
205+
fieldRef:
206+
apiVersion: v1
207+
fieldPath: metadata.namespace
208+
- name: POD_NAME
209+
valueFrom:
210+
fieldRef:
211+
apiVersion: v1
212+
fieldPath: metadata.name
213+
imagePullPolicy: IfNotPresent
214+
name: logs
215+
resources:
216+
requests:
217+
cpu: 200m
218+
memory: 100M
219+
terminationMessagePath: /dev/termination-log
220+
terminationMessagePolicy: File
221+
volumeMounts:
222+
- mountPath: /data/db
223+
name: mongod-data
224+
- mountPath: /opt/percona
225+
name: bin
226+
- args:
227+
- logrotate
228+
command:
229+
- /opt/percona/logcollector/entrypoint.sh
230+
env:
231+
- name: MONGODB_HOST
232+
value: localhost
233+
- name: MONGODB_PORT
234+
value: "27017"
235+
- name: MONGODB_USER
236+
valueFrom:
237+
secretKeyRef:
238+
key: MONGODB_CLUSTER_ADMIN_USER_ESCAPED
239+
name: internal-another-name-users
240+
optional: false
241+
- name: MONGODB_PASSWORD
242+
valueFrom:
243+
secretKeyRef:
244+
key: MONGODB_CLUSTER_ADMIN_PASSWORD_ESCAPED
245+
name: internal-another-name-users
246+
optional: false
247+
imagePullPolicy: IfNotPresent
248+
name: logrotate
249+
resources:
250+
requests:
251+
cpu: 200m
252+
memory: 100M
253+
terminationMessagePath: /dev/termination-log
254+
terminationMessagePolicy: File
255+
volumeMounts:
256+
- mountPath: /data/db
257+
name: mongod-data
258+
- mountPath: /opt/percona
259+
name: bin
194260
dnsPolicy: ClusterFirst
195261
initContainers:
196262
- command:

e2e-tests/default-cr/compare/statefulset_my-cluster-name-rs0.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ spec:
6666
value: "27017"
6767
- name: MONGODB_REPLSET
6868
value: rs0
69+
- name: LOGCOLLECTOR_ENABLED
70+
value: "true"
6971
envFrom:
7072
- secretRef:
7173
name: internal-my-cluster-name-users
@@ -193,6 +195,70 @@ spec:
193195
readOnly: true
194196
- mountPath: /data/db
195197
name: mongod-data
198+
- args:
199+
- fluent-bit
200+
command:
201+
- /opt/percona/logcollector/entrypoint.sh
202+
env:
203+
- name: LOG_DATA_DIR
204+
value: /data/db/logs
205+
- name: POD_NAMESPACE
206+
valueFrom:
207+
fieldRef:
208+
apiVersion: v1
209+
fieldPath: metadata.namespace
210+
- name: POD_NAME
211+
valueFrom:
212+
fieldRef:
213+
apiVersion: v1
214+
fieldPath: metadata.name
215+
imagePullPolicy: IfNotPresent
216+
name: logs
217+
resources:
218+
requests:
219+
cpu: 200m
220+
memory: 100M
221+
terminationMessagePath: /dev/termination-log
222+
terminationMessagePolicy: File
223+
volumeMounts:
224+
- mountPath: /data/db
225+
name: mongod-data
226+
- mountPath: /opt/percona
227+
name: bin
228+
- args:
229+
- logrotate
230+
command:
231+
- /opt/percona/logcollector/entrypoint.sh
232+
env:
233+
- name: MONGODB_HOST
234+
value: localhost
235+
- name: MONGODB_PORT
236+
value: "27017"
237+
- name: MONGODB_USER
238+
valueFrom:
239+
secretKeyRef:
240+
key: MONGODB_CLUSTER_ADMIN_USER_ESCAPED
241+
name: internal-my-cluster-name-users
242+
optional: false
243+
- name: MONGODB_PASSWORD
244+
valueFrom:
245+
secretKeyRef:
246+
key: MONGODB_CLUSTER_ADMIN_PASSWORD_ESCAPED
247+
name: internal-my-cluster-name-users
248+
optional: false
249+
imagePullPolicy: IfNotPresent
250+
name: logrotate
251+
resources:
252+
requests:
253+
cpu: 200m
254+
memory: 100M
255+
terminationMessagePath: /dev/termination-log
256+
terminationMessagePolicy: File
257+
volumeMounts:
258+
- mountPath: /data/db
259+
name: mongod-data
260+
- mountPath: /opt/percona
261+
name: bin
196262
dnsPolicy: ClusterFirst
197263
initContainers:
198264
- command:

0 commit comments

Comments
 (0)