Skip to content

feat: observe charm reconciler and drop k8s resource patch (backport #453) - #454

Merged
lucabello merged 1 commit into
track/1.18from
feat/observe-reconciler-1.18
Nov 3, 2026
Merged

lucabello merged 1 commit into
track/1.18from
feat/observe-reconciler-1.18

Conversation

@lucabello

Copy link
Copy Markdown
Contributor

Issue

Backport of the main change to track/1.18, mirroring canonical/mimir-operators#491 and canonical/tempo-operators#437.

The coordinator's own _reconcile is registered for all events, so it also runs on pebble-check-failed, which coordinated-workers deliberately excludes from reconciliation. The charms also still vendor the Kubernetes compute resource patch lib and the old istio_beacon_k8s service mesh lib, which coordinated-workers 5 replaces.

Solution

  • Bump coordinated-workers to >=5 in coordinator and worker (4.0.1 -> 5.0.1; the lockfiles also move ops to 3.9.0 and charmlibs-nginx-k8s to 1.0.1).
  • Observe the charm reconciler for all_events minus NON_RECONCILABLE_EVENTS. Coordinator's reconcile is registered first, so it still runs first.
  • Drop the k8s resource patch: remove resources_requests/container_name from the Coordinator and Worker constructors, the vendored kubernetes_compute_resources_patch and istio_beacon_k8s libs, the fixtures that mocked the patch, and the tests asserting its blocked/waiting statuses (test_k8s_patch_failed, test_k8s_patch_waiting, and the worker's test_charm_statuses.py, which only held those).
  • Pin pytest-interface-tester to ec9e76e in both charms. 3.4.1 reads the private _EventPath.suffix, which ops-scenario 8.9.0 (required by ops[testing] 3.9.0) removed, so the interface tests fail without it. The fix is on its main branch but unreleased; switch back to PyPI once a release includes it.

Context

juju trust is still required; the charms still patch labels through lightkube.

Testing Instructions

For coordinator and worker: tox -e lint,static,unit (coordinator unit includes the interface tests), plus tox -e interface in the worker. All pass locally. Integration tests were not run locally.

Upgrade Notes

The charms no longer set CPU/memory resource requests on the nginx (coordinator) and workload (worker) containers.

The coordinator's own `_reconcile` is registered as an observer for all
events, so it also runs on `pebble-check-failed`, which
coordinated-workers deliberately excludes from reconciliation. The
charms also still vendor the Kubernetes compute resource patch lib and
the old `istio_beacon_k8s` service mesh lib, which coordinated-workers 5
replaces. This mirrors mimir-operators#491.

Observe the charm reconciler for `all_events` minus
`NON_RECONCILABLE_EVENTS`; Coordinator's reconcile is registered first,
so it still runs before ours.

Bump coordinated-workers to >=5, which drops the Kubernetes compute
resource patch:
- remove `resources_requests`/`container_name` from the `Coordinator`
  and `Worker` constructors
- delete the vendored `kubernetes_compute_resources_patch` and
  `istio_beacon_k8s` charm libs, the fixtures mocking the patch and the
  tests asserting its blocked/waiting statuses
- pin `pytest-interface-tester` to `ec9e76e` in both charms:
  3.4.1 reads the private `_EventPath.suffix`, which ops-scenario 8.9.0
  (required by `ops[testing]` 3.9.0) removed, so the interface tests
  fail without it. Switch back to PyPI once a release includes the fix.

The charms no longer set CPU/memory resource requests on the nginx
(coordinator) and workload (worker) containers.
@lucabello
lucabello force-pushed the feat/observe-reconciler-1.18 branch from 4946f97 to 810e15f Compare November 3, 2026 16:42
@lucabello
lucabello merged commit ab00ef5 into track/1.18 Nov 3, 2026
37 checks passed
@lucabello
lucabello deleted the feat/observe-reconciler-1.18 branch November 3, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants