RonJay
04/28/2026, 6:16 AMRocky
04/28/2026, 6:17 AMstatus.observedGeneration remains empty and no reconcile firing—point to a Predicate filtering issue in the operator's controller-runtime logic.
1. Predicate Filtering: The operator uses a GenerationChangedPredicate (or similar logic) to ignore updates that only affect the status block. When the HPA updates the /scale subresource, it modifies spec.starRocksCnSpec.replicas. While this increments the metadata.generation, some versions of the operator had logic that failed to recognize this specific nested field change as a "reconcileable" event unless other metadata (like annotations) also changed.
2. Observed Generation: The fact that status.observedGeneration remains empty suggests that the operator has never successfully completed a status update for that CR, or the status subresource is not being updated correctly during the reconcile loop.
3. HPA & Shared Data: In shared_data mode, the operator must handle CN scaling specifically. There was a known issue (tracked similarly to Issue #725 and related PRs) where the operator's internal "diff" logic between the desired and actual state of the StatefulSet did not always trigger correctly when the change originated from the HPA subresource.
Recommended Fix & Version
This behavior was identified and addressed in updates following the v1.11.4 release.
* Upgrade to v1.12.x: It is highly recommended to upgrade to v1.12.0 or later. The v1.12.x branch includes significant refactoring of the reconciliation and status update logic, specifically improving how the operator handles subresource updates and HPA-driven scaling for CN nodes.
* CRD Update Requirement: Note that starting from v1.11.2, a new field podManagementPolicy was added to the CRD. If you haven't manually updated your CRD to the latest version, the operator might fail to reconcile correctly because it cannot process the full schema, which often leads to the "empty status" symptom you are seeing. Ensure you apply the latest CRDs:
bash
kubectl apply -f <https://github.com/StarRocks/starrocks-kubernetes-operator/releases/download/v1.12.0/starrocks.com_starrocksclusters.yaml>
Immediate Workarounds
If you cannot upgrade immediately, you can use the following workarounds:
* Touch Annotations: As you discovered, adding/modifying an annotation (e.g., kubectl annotate src <name> reconcile-trigger=$(date +%s) --overwrite) forces the predicate to pass and triggers the scale.
* Verify HPA Target: Ensure your HPA is targeting the StarRocksCluster (SRC) and not the underlying StatefulSet directly. The operator is designed to manage the StatefulSet replicas based on the SRC spec; if HPA targets the STS, the operator will likely fight it and scale it back.
* Check Operator Permissions: Ensure the operator's ClusterRole has the necessary permissions for the scale subresource on `starrocksclusters`:
yaml
• apiGroups: ["<http://starrocks.com|starrocks.com>"]
resources: ["starrocksclusters/scale"]
verbs: ["get", "update", "patch"]
Summary: The issue is a known watch/predicate limitation in v1.11.4. Upgrading to v1.12.x is the definitive fix, as it matures the HPA support and ensures that /scale subresource updates correctly trigger the reconciliation loop.
References
• deployment/sr_operator.md
• quick_start/helm.md
• deployment/helm.md