From 48296a7cce313993dbde25a2f17928e44440e745 Mon Sep 17 00:00:00 2001 From: Scot Schuchert-Wells <6007097+scotwells@users.noreply.github.com> Date: Fri, 30 Oct 2026 17:24:23 +0000 Subject: [PATCH] fix: install cell CRDs on the test cell The e2e upstream cluster plays the cell, but only config/e2e is applied to it, which carries config/crd and not config/crd/downstream. The cell controller manager watches NetworkLoadBalancerBackendHealth, so with that kind absent its watch cannot sync and the manager exits every two minutes. A NetworkInterface delete that lands in a restart window is never seen by the write-back controller, so the published copy is not collected within a test's 120s window. Key changes: - add a cell-crds task that applies config/crd/downstream to the upstream cluster, the same set the hub and the downstream cluster already get - run test-infra:cell-crds in test-infra:up before prepare-upstream deploys the cell Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com> --- Taskfile.test-infra.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Taskfile.test-infra.yml b/Taskfile.test-infra.yml index 3059b673..eb1a7648 100644 --- a/Taskfile.test-infra.yml +++ b/Taskfile.test-infra.yml @@ -164,6 +164,9 @@ tasks: - task: milo-bundle - task: nso-image - task: dns-crds + # The cell set has to be served on this cluster before the cell controller + # manager starts; it watches kinds that only this set installs. + - task: cell-crds - task: prepare-upstream # Everything that needs a certificate has to follow prepare-upstream. # Upstream cert-manager crashloops with "the Gateway API CRDs do not seem @@ -427,6 +430,16 @@ tasks: - '{{.KUSTOMIZE}} build config/tools/locations-crds | kubectl --context {{.UPSTREAM_CTX}} apply -f -' - '{{.KUSTOMIZE}} build config/tools/locations-crds | kubectl --context {{.DOWNSTREAM_CTX}} apply -f -' + cell-crds: + desc: "Install on the upstream cluster (which plays the cell here) the NSO CRDs every cell carries: the same config/crd/downstream union karmada-up applies to the hub and downstream-crds to the downstream cluster." + cmds: + # The cell controller manager watches NetworkLoadBalancerBackendHealth on + # its local cluster. A kind it watches but the cluster does not serve fails + # cache sync, and the manager exits after the two-minute sync timeout. + - | + {{.KUSTOMIZE}} build --load-restrictor LoadRestrictionsNone config/crd/downstream | \ + kubectl --context {{.UPSTREAM_CTX}} apply -f - + external-dns: desc: "Install external-dns CRDs (DNSEndpoint) on the downstream cluster." cmds: