pkg/readiness: Fix etcd health check for HyperShift hosted clusters#1
Merged
harche merged 1 commit intoJun 25, 2026
Merged
Conversation
On HyperShift hosted clusters, etcd runs on the management cluster and the etcd ClusterOperator does not exist on the guest cluster. The EtcdHealthCheck now handles the NotFound case by returning externally_managed: true instead of erroring, which prevents the readiness check from failing on HyperShift. The etcd e2e comparison test is also skipped on HyperShift since the openshift-etcd namespace does not exist on hosted clusters, making ground-truth pod comparison impossible. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Fixes the
e2e-hypershift-conformanceCI failures in PR openshift#1395 caused by the etcd readiness check and its e2e test not accounting for HyperShift topology.On HyperShift hosted clusters, etcd runs on the management cluster — the
etcdClusterOperator andopenshift-etcdnamespace do not exist on the guest cluster. This caused two blocking test failures:should run all checks without errors—EtcdHealthCheckerrored trying to fetch the missing etcd CO, causingChecksErrored > 0should report etcd member count matching actual etcd pods— listing pods in the non-existentopenshift-etcdnamespace failedChanges
pkg/readiness/etcd_health.go: HandleNotFoundon the etcd ClusterOperator by returning{externally_managed: true, total_members: 0, healthy_members: 0}with statusokinstead of erroring. Non-NotFound errors (permissions, timeouts) still propagate as errors.test/cvo/readiness.go: Skip the etcd comparison test on HyperShift using the existingutil.SkipIfHypershift()helper, since there are no etcd pods to compare against. All other readiness tests (node capacity, operators, network, PDBs, etc.) continue to run on HyperShift.Test plan
go build ./...passesgo test ./pkg/readiness/— all unit tests passmake updateproduces no diff)