Skip to content

Commit c257229

Browse files
Split e2e-k3d into separate chainsaw and kuttl jobs
1 parent 0566e11 commit c257229

File tree

1 file changed

+53
-35
lines changed

1 file changed

+53
-35
lines changed

.github/workflows/test.yaml

Lines changed: 53 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
path: envtest-existing.coverage.gz
8282
retention-days: 1
8383

84-
e2e-k3d:
84+
e2e-k3d-chainsaw:
8585
runs-on: ubuntu-24.04
8686
needs: [go-test]
8787
strategy:
@@ -130,47 +130,63 @@ jobs:
130130
--env 'PGO_FEATURE_GATES=TablespaceVolumes=true,OpenTelemetryLogs=true,OpenTelemetryMetrics=true' \
131131
--name 'postgres-operator' localhost/postgres-operator
132132
133-
- name: Check initial environment health
134-
run: |
135-
echo "::group::Docker system info"
136-
docker system df
137-
docker info | grep -E 'Storage Driver|Data Space'
138-
echo "::endgroup::"
139-
echo "::group::k3d node disk space"
140-
docker exec k3d-k3s-default-server-0 df -h
141-
echo "::endgroup::"
142-
echo "::group::Storage provisioner status"
143-
kubectl get storageclass -o wide
144-
kubectl get pods -n kube-system -l app=local-path-provisioner -o wide
145-
echo "::endgroup::"
146-
147-
- name: Start resource monitoring
148-
run: |
149-
nohup .github/actions/k3d/monitor-resources.sh 30 600 chainsaw-resource-monitor.log &
150-
echo $! > monitor.pid
151-
152133
- run: |
153134
make check-chainsaw && exit
154135
failed=$?
155136
echo '::group::PGO logs'; docker logs 'postgres-operator'; echo '::endgroup::'
156137
exit $failed
157138
158-
- name: Stop resource monitoring
159-
if: always()
160-
run: |
161-
if [ -f monitor.pid ]; then
162-
kill $(cat monitor.pid) 2>/dev/null || true
163-
rm monitor.pid
164-
fi
165-
166-
- name: Upload resource monitoring logs
167-
if: always()
168-
uses: actions/upload-artifact@v4
139+
- name: Stop PGO
140+
run: docker stop 'postgres-operator' || true
141+
142+
e2e-k3d-kuttl:
143+
runs-on: ubuntu-24.04
144+
needs: [go-test]
145+
strategy:
146+
fail-fast: false
147+
matrix:
148+
kubernetes: [v1.30, v1.33]
149+
steps:
150+
- uses: actions/checkout@v5
151+
- uses: actions/setup-go@v6
152+
with: { go-version: stable }
153+
154+
- name: Start k3s
155+
uses: ./.github/actions/k3d
169156
with:
170-
name: "chainsaw-resource-monitor-k8s=${{ matrix.kubernetes }}"
171-
path: chainsaw-resource-monitor.log
172-
retention-days: 7
173-
if-no-files-found: ignore
157+
k3s-channel: "${{ matrix.kubernetes }}"
158+
prefetch-images: |
159+
registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2542
160+
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.6-2542
161+
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.10-2542
162+
163+
- name: Get pgMonitor files.
164+
run: make get-pgmonitor
165+
env:
166+
PGMONITOR_DIR: "${{ github.workspace }}/hack/tools/pgmonitor"
167+
QUERIES_CONFIG_DIR: "${{ github.workspace }}/hack/tools/queries"
168+
169+
# Start a Docker container with the working directory mounted.
170+
- run: make build BUILDAH=docker
171+
- name: Start PGO
172+
run: |
173+
kubectl apply --server-side -k ./config/namespace
174+
kubectl apply --server-side -k ./config/dev
175+
hack/create-kubeconfig.sh postgres-operator pgo
176+
docker run --detach --network host --read-only \
177+
--volume "$(pwd):/mnt" --workdir '/mnt' \
178+
--env 'QUERIES_CONFIG_DIR=/mnt/hack/tools/queries' \
179+
--env 'KUBECONFIG=hack/.kube/postgres-operator/pgo' \
180+
--env 'RELATED_IMAGE_PGBACKREST=registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2542' \
181+
--env 'RELATED_IMAGE_PGBOUNCER=registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2542' \
182+
--env 'RELATED_IMAGE_PGEXPORTER=registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.17.1-2542' \
183+
--env 'RELATED_IMAGE_PGUPGRADE=registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-18.0-2542' \
184+
--env 'RELATED_IMAGE_POSTGRES_16=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.10-2542' \
185+
--env 'RELATED_IMAGE_POSTGRES_17=registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.6-2542' \
186+
--env 'RELATED_IMAGE_STANDALONE_PGADMIN=registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.8-2542' \
187+
--env 'RELATED_IMAGE_COLLECTOR=registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.4-0' \
188+
--env 'PGO_FEATURE_GATES=TablespaceVolumes=true,OpenTelemetryLogs=true,OpenTelemetryMetrics=true' \
189+
--name 'postgres-operator' localhost/postgres-operator
174190
175191
- run: make generate-kuttl
176192
env:
@@ -194,6 +210,8 @@ jobs:
194210
needs:
195211
- kubernetes-api
196212
- kubernetes-k3d
213+
- e2e-k3d-chainsaw
214+
- e2e-k3d-kuttl
197215
steps:
198216
- uses: actions/checkout@v5
199217
- uses: actions/setup-go@v6

0 commit comments

Comments
 (0)