Manager does not detect Route CRD that appears after startup
Maintainer thường phản hồi trong vòng 1 ngày
@atishay-kasliwal đang làm issue này rồi.
Từ ngày 19/11/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start with cmd/main.go and trace how util.IsRouteAPIFound() controls routev1.AddToScheme; then read the startup call to InspectCluster. The report says both checks happen only once, so investigate where API discovery or CRD events could update the scheme after startup. Done means a Route CRD created after manager startup can be reconciled without restarting the manager.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
On a GKE management cluster where HyperShift is installed through GitOps, the OpenShift GitOps manager starts before the routes.route.openshift.io CRD exists. The manager registers the Route type only at startup: cmd/main.go calls routev1.AddToScheme only when util.IsRouteAPIFound() is true, and InspectCluster runs once. A Route API that appears later is never added to the scheme, so every Route reconciliation fails with:
no kind is registered for the type v1.Route in scheme "pkg/runtime/scheme.go:111"
The ArgoCD instance stays phase=Failed with Reconciled=False until the manager pod is restarted with the Route API present. This is not an edge case for this deployment shape: because the cluster installs HyperShift through Argo CD, the manager always starts before HyperShift creates the Route CRD.
To Reproduce
- Create a GKE cluster and install the OpenShift GitOps 1.22.2 operator, so the manager starts while
route.openshift.iois absent. - Confirm the API group is absent:
kubectl --context "$CTX" api-resources --api-group=route.openshift.io
Expected: no resources listed.
- Install HyperShift through Argo CD. The sync creates
routes.route.openshift.ioroughly 47 minutes after the manager started. - Wait for the operator to reconcile the
ArgoCDinstance.
Actual results
ArgoCD reports phase: Failed, Reconciled: False with the scheme error above. The operator log repeats the same error on each Route reconcile and it persists indefinitely.
Expected behavior
The manager should handle a Route CRD that appears after startup. Two approaches that would satisfy the use case:
- re-run API discovery periodically or on CRD watch events and add the Route type to the scheme once
routes.route.openshift.iois available, or - watch for the CRD itself instead of doing a one-time check at startup.
No claim is made about which approach upstream prefers.
Environment
- OpenShift GitOps 1.22.2, release 7 (
openshift-gitops-operator.v1.22.2) - Advisory RHBA-2026:83602 (2026-10-15)
- Bundle
registry.redhat.io/openshift-gitops-1/gitops-operator-bundle@sha256:2ba58c50f771c08bbc5a1d8572c7b058df55bc71667cc66026d42840eb4bee6d - Operator source
redhat-developer/gitops-operatoratcf32771491be2ed7f03d43d279171d6c265f2d2b - Downstream source
rh-gitops-midstream/releaseat219dafaaf0e9431f8b468b4932f337f3ce397058 - GKE
1.36.4-gke.2377000on Autopilot,REGULARchannel - Config Sync 1.23.3, Argo CD installed by Config Sync from a public bootstrap repo
Additional context
Timeline observed on 2026-11-13 (UTC):
- 16:00:03: manager pod started in
gitops-operator. - 16:46:57: HyperShift CRDs landed on the management cluster API server after the root ApplicationSet synced the management-cluster applications.
- 16:47:00:
routes.route.openshift.iocreated. - 16:47:11 to 17:08:
ArgoCDreportedphase=Failed,Reconciled=False; the scheme error repeated on every Route reconcile. - 17:08: manager pod deleted manually. The replacement registered the Route scheme and the instance reached
phase=Available,Reconciled=True. No Route object was created because every route switch in the instance spec is disabled.
Source reference at the released commit cf327714:
cmd/main.gocallsroutev1.AddToSchemeonly whenutil.IsRouteAPIFound()returns true.InspectClusterruns once at startup.
GITOPS-11466 (PR #1321, release backport #1354, commit 139db716ae65182624429cc1d78cd5a1c625f15c) makes Route detection independent of the Config API. That fixes a manager that starts after the Route CRD exists but with the Config API absent. It does not cover a Route API that appears after startup.
Workaround, either variant restores the manager without a code change:
- Install the Route CRD before the GitOps manager starts.
- Restart the manager once
routes.route.openshift.ioexists:
kubectl --context "$CTX" get crd routes.route.openshift.io
kubectl --context "$CTX" -n "$OPERATOR_NS" rollout restart deployment/openshift-gitops-operator-controller-manager
kubectl --context "$CTX" -n "$OPERATOR_NS" rollout status deployment/openshift-gitops-operator-controller-manager
This was found during a bounded development validation on a disposable GKE cluster. It is not a support or certification statement about this configuration.
- Ngôn ngữ chính
- Go
- Star
- 190
- Fork
- 367
- Merge trung bình
- 4 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 63
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của redhat-developer/gitops-operator
-
NamespaceManagement revocation checks labels on the wrong namespaceCó thể đã có người làm @Rizwana777 đã nhận 3 ngày trước. Đang mởkind/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
redhat-developer/gitops-operator#1559 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Deleting an ArgoCD instance removes RBAC belonging to same-named instancesCó thể đã có người làm @Rizwana777 đã nhận 3 ngày trước. Đang mởkind/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
redhat-developer/gitops-operator#1558 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
NamespaceManagement cleanup can delete RBAC in unrelated namespacesCó thể đã có người làm @Rizwana777 đã nhận 3 ngày trước. Đang mởkind/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
redhat-developer/gitops-operator#1557 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ApplicationSet tokenRef strict mode changes only apply after the controller is restartedCó thể đã có người làm @Gabrielandre02 đã nhận 5 ngày trước. Đang mở
redhat-developer/gitops-operator#1554 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enqueue the previous Argo CD instance when NamespaceManagement consent is withdrawnCó thể đã có người làm @Gabrielandre02 đã nhận 5 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
redhat-developer/gitops-operator#1530 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của redhat-developer/gitops-operator
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Inconsistency between golang and cue in specCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Tencent/LoopForge#1087 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày