Skip to content

feat: label component pods for status.components - #45

Merged
recharte merged 1 commit into
mainfrom
feat/label-component-pods
Oct 7, 2026
Merged

recharte merged 1 commit into
mainfrom
feat/label-component-pods

Conversation

@recharte

@recharte recharte commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Labels each component's pods so the provider runtime reports them on the Instance: pod counts in status.components (openeverest/openeverest#3335) and the PodsScheduled / PodsReady conditions (openeverest/openeverest#3312).

  • RBAC. The runtime needs list and watch on pods to report them. The pods marker was only an example comment, so this adds get, list and watch. make generate syncs the rule to config/rbac and the chart.
  • Labels. labelPods puts c.PodLabels(component) on spec.instances[].metadata.labels (engine) and spec.proxy.pgBouncer.metadata.labels (proxy). The operator merges these into the pod templates only. The instance StatefulSet and PgBouncer Deployment selectors keep the operator's own labels, so existing clusters roll once and keep their selectors.

Notes

Testing

  • make test-unit, make lint (0 issues), make generate.
  • Chainsaw core/cluster now asserts the labels on the instance set and PgBouncer specs of the PerconaPGCluster. It also checks that the Instance reports engine and proxy with their selectors and 0/0 pods (the operator is scaled to 0 there). With no pods, the PodsScheduled and PodsReady conditions would be True whatever the runtime did, so they are not asserted; their logic is unit-tested in core.
  • Not yet tried on a cluster with the real operator.

Grants list and watch on pods and sets Context.PodLabels on the instance
and PgBouncer pods.

Signed-off-by: Diogo Recharte <diogo.recharte@solanica.io>
@recharte
recharte force-pushed the feat/label-component-pods branch from 5cac6e2 to 088db31 Compare October 7, 2026 09:12
@recharte
recharte marked this pull request as ready for review October 7, 2026 09:13
@recharte
recharte requested a review from a team as a code owner October 7, 2026 09:13
@recharte
recharte merged commit 21dfa62 into main Oct 7, 2026
12 checks passed
@recharte
recharte deleted the feat/label-component-pods branch October 7, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant