Skip to content

Commit abcf604

Browse files
scotwellsclaude
andcommitted
ci: install Gateway-API CRDs on the upstream cluster before cert-manager
cert-manager runs with enableGatewayAPI:true, so it crashloops at startup when the Gateway-API CRDs are absent. The downstream cluster gets them from eg-crds first; the upstream only got them later via prepare-upstream (config/e2e). The resulting crashloop delayed issuance of the manager's webhook serving cert by ~2.5min, so the manager sat in ContainerCreating waiting on the secret and bring-up timed out. Add an upstream-gateway-crds task (same chart-bundled CRDs as eg-crds) and run it before cert-manager-upstream. Also bump the manager readiness wait to 300s and fix the diagnostics describe loop so pod events are captured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JbCy8vy66RdNYzGSgqH6P6
1 parent c8b5fe3 commit abcf604

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/test-e2e-federated.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ jobs:
9595
for ctx in kind-nso-upstream kind-nso-downstream; do
9696
echo "### $ctx"
9797
kubectl --context "$ctx" get pods -A \
98-
--field-selector=status.phase!=Running,status.phase!=Succeeded -o name | while read -r p; do
99-
ns=$(kubectl --context "$ctx" get "$p" -A -o jsonpath='{..metadata.namespace}' 2>/dev/null)
100-
kubectl --context "$ctx" -n "$ns" describe "${p#*/}" 2>/dev/null | tail -30
98+
--field-selector=status.phase!=Running,status.phase!=Succeeded \
99+
-o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{"\n"}{end}' \
100+
| while read -r ns name; do
101+
[ -n "$name" ] || continue
102+
kubectl --context "$ctx" -n "$ns" describe pod "$name" 2>/dev/null | tail -30
101103
done
102104
done
103105
echo "::endgroup::"

Taskfile.test-infra.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ tasks:
105105
- task: eg-crds
106106
- task: downstream-crds
107107
- task: downstream-namespaces
108+
# cert-manager runs with enableGatewayAPI:true and crashloops at startup if
109+
# the Gateway-API CRDs are absent. The downstream gets them from eg-crds; the
110+
# upstream otherwise wouldn't until prepare-upstream (config/e2e), far too
111+
# late — the crashloop delays the manager's webhook cert and stalls bring-up.
112+
- task: upstream-gateway-crds
108113
- task: cert-manager-upstream
109114
- task: cert-manager-downstream
110115
- task: nso-image
@@ -208,6 +213,13 @@ tasks:
208213
- kubectl --context {{.DOWNSTREAM_CTX}} apply --server-side=true --force-conflicts -f {{.EG_CRD_DIR}}/gatewayapi-crds.yaml
209214
- kubectl --context {{.DOWNSTREAM_CTX}} apply --server-side=true --force-conflicts -f {{.EG_CRD_DIR}}/generated/
210215

216+
upstream-gateway-crds:
217+
desc: "Install the Gateway-API CRDs on the upstream cluster so cert-manager (enableGatewayAPI:true) starts cleanly instead of crashlooping until config/e2e lands them. Uses the same chart-bundled CRDs as eg-crds; requires eg-chart to have pulled the chart."
218+
vars:
219+
EG_CRD_DIR: config/tools/envoy-gateway-downstream/charts/gateway-helm-{{.ENVOY_GATEWAY_VERSION}}/gateway-helm/crds
220+
cmds:
221+
- kubectl --context {{.UPSTREAM_CTX}} apply --server-side=true --force-conflicts -f {{.EG_CRD_DIR}}/gatewayapi-crds.yaml
222+
211223
downstream-namespaces:
212224
desc: "Create the downstream gateway + hostname-accounting namespaces, plus the EG-watched e2e-direct namespace for hand-delivered fixtures (D1/D2). Runs BEFORE eg-downstream so e2e-direct carries its watch label before EG establishes its informer."
213225
cmds:
@@ -323,7 +335,7 @@ tasks:
323335
desc: "Wait for the core components (NSO manager, downstream EG, ext-server) to be Available."
324336
cmds:
325337
- echo "⏳ waiting for NSO manager (upstream)"
326-
- kubectl --context {{.UPSTREAM_CTX}} -n network-services-operator-system wait deploy network-services-operator-controller-manager --for=condition=Available --timeout=240s
338+
- kubectl --context {{.UPSTREAM_CTX}} -n network-services-operator-system wait deploy network-services-operator-controller-manager --for=condition=Available --timeout=300s
327339
- echo "⏳ waiting for downstream EG"
328340
# The gateway control-plane Deployment is named `envoy-gateway` by its chart,
329341
# not after the release name.

0 commit comments

Comments
 (0)