Repository navigation
fix(e2e): install cell CRDs on the upstream test cell - #811
Merged
Merged
Conversation
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>
ecv
approved these changes
Oct 30, 2026
ecv
left a comment
Contributor
There was a problem hiding this comment.
Approve.
Test harness only: it applies the same config/crd/downstream set to the kind cluster that plays the cell, so the cell controller manager's NetworkLoadBalancerBackendHealth watch can sync and the manager stops exiting every two minutes. Nothing that ships changes.
cell-crdsruns beforeprepare-upstream, so any CRD present in both the cell set and the control-plane set is applied from the cell set first and then overwritten by the control-plane copy, which is the version the upstream manager expects. Both come from this repo at the same commit, so they should agree anyway.- The root cause is the right one: the delete event was lost while the watch was down, and the ten-minute sweep is longer than the test's 120s wait. Fixing the restart rather than lengthening the wait keeps the test honest.
Follow-ups:
- The manager exiting on a kind its cluster does not serve would do the same on a real cell missing that CRD. A startup check that names the missing kind would make that obvious instead of a two-minute restart loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The e2e environment runs the cell controller manager on the upstream cluster but installed only the control-plane custom resources there, so a kind the manager watches was missing. The manager exited and restarted every two minutes, and while its watches were down a resource deletion went unseen, so an end-to-end check failed intermittently. The environment now installs the full cell custom resource set before the cell starts, so the manager keeps running and deleted resources are collected promptly.
Detection evidence
Affected:
int_17ad4b457001o98datdn4tkmWhy this fix
The write-back controller collects a published NetworkInterface only from the source delete event or a ten-minute sweep, and the test waits 120s. The controller manager was restarting every two minutes because the upstream test cluster never served
NetworkLoadBalancerBackendHealth, a kind its controller watches: this harness installs the cell custom resource set on the hub and the downstream cluster but never on the cluster that plays the cell. Installing the same set on the upstream cell stops the restart cycle, so the delete is delivered and the copy collected promptly. The ten-minute sweep stays as the backstop for a genuinely missed event.Production impact: E2E cell CRD install only adds manifests to a local test cluster
The only changed path,
Taskfile.test-infra.yml, builds a local kind cluster and applies Kubernetes manifests to it during CI; it does not push an image or deploy to any connected production cluster. I checked the repository's one outbound deploy edge, the image repository, and this diff does not alter the image or its deployment.Fix walkthrough
Watch the fix explained (1:27). Recorded for commit
48296a7cce313993dbde25a2f17928e44440e745.Checked and not affected (1)
datum-cloud/network-services-operatorObservability
controller-runtime.source.Kindif kind is a CRD, it should be installed before calling Starterror, which this change removes.collecting a published interface with no interface behind itsweep log.Polylane assessed this pull request at
48296a7.Causal chain
if kind is a CRD, it should be installed before calling Startkind NetworkLoadBalancerBackendHealth.networking.datumapis.comno matches for kind ... v1alpha.1 file changed (+13/-0)
Taskfile.test-infra.yml: modified, +13/-0Repository lint:
make lint(declared in CLAUDE.md) did not finish within its time budget, so its verdict is not known; run it before merging.Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.