Skip to content

Commit 9feb185

Browse files
kaovilaiclaude
andauthored
mongo something stable (#2013)
Remove local must-gather directory and build process in favor of using the external quay.io/konveyor/oadp-must-gather:latest image via oc adm must-gather. This eliminates architecture mismatch issues and keeps must-gather code in its dedicated repository. Changes: - Updated RunMustGather() in tests/e2e/lib/apps.go to use oc adm must-gather - Added MUST_GATHER_IMAGE env var (defaults to quay.io/konveyor/oadp-must-gather:latest) - Removed build-must-gather target from Makefile - Removed entire must-gather/ directory (3,174 lines deleted) - Updated documentation in TESTING.md The SKIP_MUST_GATHER flag is preserved for skipping must-gather collection. Version-specific images can be used by setting MUST_GATHER_IMAGE env var. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Revert "refactor(e2e): migrate to external oadp-must-gather container image" This reverts commit 09a2a49. Revert "fix(e2e): derive must-gather directory pattern from image name" This reverts commit 2ae6d45. fix(e2e): update mongo image version and resource limits in mongo-persistent deployment fix(e2e): update mongo image version and resource limits in mongo-persistent deployment fix(e2e): derive must-gather directory pattern from image name The directory pattern was hardcoded to 'quay-io-konveyor-oadp-must-gather-*' which breaks when using custom images via MUST_GATHER_IMAGE env var. Now dynamically derives the pattern from the actual image name by replacing registry separators (. / :) with hyphens to match oc adm must-gather's directory naming convention. Examples: - quay.io/konveyor/oadp-must-gather:latest -> quay-io-konveyor-oadp-must-gather-latest-* - docker.io/myuser/custom:v1 -> docker-io-myuser-custom-v1-* 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5048a8f commit 9feb185

File tree

3 files changed

+82
-31
lines changed

3 files changed

+82
-31
lines changed

tests/e2e/sample-applications/mongo-persistent/mongo-persistent-block.yaml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ items:
7171
# Used to format the block device (put filesystem on it).
7272
# This allows Mongo to use the filesystem which lives on block device.
7373
initContainers:
74-
- image: docker.io/library/mongo:latest
74+
- image: docker.io/library/mongo:7.0
7575
imagePullPolicy: IfNotPresent
7676
securityContext:
7777
privileged: true
@@ -102,7 +102,7 @@ items:
102102
- name: block-volume-pv
103103
devicePath: /dev/xvdx
104104
containers:
105-
- image: docker.io/library/mongo:latest
105+
- image: docker.io/library/mongo:7.0
106106
name: mongo
107107
securityContext:
108108
privileged: true
@@ -117,8 +117,10 @@ items:
117117
- containerPort: 27017
118118
name: mongo
119119
resources:
120-
limits:
120+
requests:
121121
memory: 512Mi
122+
limits:
123+
memory: 1Gi
122124
command:
123125
- "sh"
124126
- "-c"
@@ -131,23 +133,38 @@ items:
131133
volumeDevices:
132134
- name: block-volume-pv
133135
devicePath: /dev/xvdx
134-
livenessProbe:
135-
tcpSocket:
136-
port: mongo
137-
initialDelaySeconds: 5
136+
readinessProbe:
137+
exec:
138+
command:
139+
- /bin/bash
140+
- -c
141+
- "mongosh --eval 'db.runCommand(\"ping\")' --quiet"
142+
initialDelaySeconds: 30
138143
periodSeconds: 10
144+
timeoutSeconds: 5
145+
failureThreshold: 3
146+
livenessProbe:
147+
exec:
148+
command:
149+
- /bin/bash
150+
- -c
151+
- "mongosh --eval 'db.runCommand(\"ping\")' --quiet"
152+
initialDelaySeconds: 60
153+
periodSeconds: 30
154+
timeoutSeconds: 10
155+
failureThreshold: 3
139156
startupProbe:
140157
exec:
141158
command:
142159
- bash
143160
- -c
144161
- |
145162
mongosh admin --authenticationDatabase admin -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval 'db.adminCommand("ping")'
146-
initialDelaySeconds: 5
147-
periodSeconds: 30
148-
timeoutSeconds: 2
163+
initialDelaySeconds: 10
164+
periodSeconds: 10
165+
timeoutSeconds: 5
149166
successThreshold: 1
150-
failureThreshold: 40 # 40x30sec before restart pod
167+
failureThreshold: 12 # 12x10sec = 2min before restart pod
151168
- image: docker.io/curlimages/curl:8.5.0
152169
name: curl-tool
153170
command: ["/bin/sleep", "infinity"]

tests/e2e/sample-applications/mongo-persistent/mongo-persistent-csi.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ items:
6767
spec:
6868
serviceAccountName: mongo-persistent-sa
6969
containers:
70-
- image: docker.io/library/mongo:latest
70+
- image: docker.io/library/mongo:7.0
7171
imagePullPolicy: IfNotPresent
7272
name: mongo
7373
securityContext:
@@ -83,28 +83,45 @@ items:
8383
- containerPort: 27017
8484
name: mongo
8585
resources:
86-
limits:
86+
requests:
8787
memory: 512Mi
88+
limits:
89+
memory: 1Gi
8890
volumeMounts:
8991
- name: mongo-data
9092
mountPath: /data/db
91-
livenessProbe:
92-
tcpSocket:
93-
port: mongo
94-
initialDelaySeconds: 5
93+
readinessProbe:
94+
exec:
95+
command:
96+
- /bin/bash
97+
- -c
98+
- "mongosh --eval 'db.runCommand(\"ping\")' --quiet"
99+
initialDelaySeconds: 30
95100
periodSeconds: 10
101+
timeoutSeconds: 5
102+
failureThreshold: 3
103+
livenessProbe:
104+
exec:
105+
command:
106+
- /bin/bash
107+
- -c
108+
- "mongosh --eval 'db.runCommand(\"ping\")' --quiet"
109+
initialDelaySeconds: 60
110+
periodSeconds: 30
111+
timeoutSeconds: 10
112+
failureThreshold: 3
96113
startupProbe:
97114
exec:
98115
command:
99116
- bash
100117
- -c
101118
- |
102119
mongosh admin --authenticationDatabase admin -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval 'db.adminCommand("ping")'
103-
initialDelaySeconds: 5
104-
periodSeconds: 30
105-
timeoutSeconds: 2
120+
initialDelaySeconds: 10
121+
periodSeconds: 10
122+
timeoutSeconds: 5
106123
successThreshold: 1
107-
failureThreshold: 40 # 40x30sec before restart pod
124+
failureThreshold: 12 # 12x10sec = 2min before restart pod
108125
- image: docker.io/curlimages/curl:8.5.0
109126
name: curl-tool
110127
command: ["/bin/sleep", "infinity"]

tests/e2e/sample-applications/mongo-persistent/mongo-persistent.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ items:
8080
spec:
8181
serviceAccountName: mongo-persistent-sa
8282
containers:
83-
- image: docker.io/library/mongo:latest
83+
- image: docker.io/library/mongo:7.0
8484
imagePullPolicy: IfNotPresent
8585
name: mongo
8686
securityContext:
@@ -96,28 +96,45 @@ items:
9696
- containerPort: 27017
9797
name: mongo
9898
resources:
99-
limits:
99+
requests:
100100
memory: 512Mi
101+
limits:
102+
memory: 1Gi
101103
volumeMounts:
102104
- name: mongo-data
103105
mountPath: /data/db
104-
livenessProbe:
105-
tcpSocket:
106-
port: mongo
107-
initialDelaySeconds: 5
106+
readinessProbe:
107+
exec:
108+
command:
109+
- /bin/bash
110+
- -c
111+
- "mongosh --eval 'db.runCommand(\"ping\")' --quiet"
112+
initialDelaySeconds: 30
108113
periodSeconds: 10
114+
timeoutSeconds: 5
115+
failureThreshold: 3
116+
livenessProbe:
117+
exec:
118+
command:
119+
- /bin/bash
120+
- -c
121+
- "mongosh --eval 'db.runCommand(\"ping\")' --quiet"
122+
initialDelaySeconds: 60
123+
periodSeconds: 30
124+
timeoutSeconds: 10
125+
failureThreshold: 3
109126
startupProbe:
110127
exec:
111128
command:
112129
- bash
113130
- -c
114131
- |
115132
mongosh admin --authenticationDatabase admin -u "$MONGO_INITDB_ROOT_USERNAME" -p "$MONGO_INITDB_ROOT_PASSWORD" --eval 'db.adminCommand("ping")'
116-
initialDelaySeconds: 5
117-
periodSeconds: 30
118-
timeoutSeconds: 2
133+
initialDelaySeconds: 10
134+
periodSeconds: 10
135+
timeoutSeconds: 5
119136
successThreshold: 1
120-
failureThreshold: 40 # 40x30sec before restart pod
137+
failureThreshold: 12 # 12x10sec = 2min before restart pod
121138
- image: docker.io/curlimages/curl:8.5.0
122139
name: curl-tool
123140
command: ["/bin/sleep", "infinity"]

0 commit comments

Comments
 (0)