Repository navigation
feat: observe charm reconciler and drop k8s resource patch (backport #453) - #454
Merged
Merged
Conversation
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
force-pushed
the
feat/observe-reconciler-1.18
branch
from
November 3, 2026 16:42
4946f97 to
810e15f
Compare
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.
Issue
Backport of the
mainchange totrack/1.18, mirroring canonical/mimir-operators#491 and canonical/tempo-operators#437.The coordinator's own
_reconcileis registered for all events, so it also runs onpebble-check-failed, whichcoordinated-workersdeliberately excludes from reconciliation. The charms also still vendor the Kubernetes compute resource patch lib and the oldistio_beacon_k8sservice mesh lib, whichcoordinated-workers5 replaces.Solution
coordinated-workersto>=5in coordinator and worker (4.0.1 -> 5.0.1; the lockfiles also move ops to 3.9.0 andcharmlibs-nginx-k8sto 1.0.1).all_eventsminusNON_RECONCILABLE_EVENTS. Coordinator's reconcile is registered first, so it still runs first.resources_requests/container_namefrom theCoordinatorandWorkerconstructors, the vendoredkubernetes_compute_resources_patchandistio_beacon_k8slibs, 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'stest_charm_statuses.py, which only held those).pytest-interface-testertoec9e76ein both charms. 3.4.1 reads the private_EventPath.suffix, which ops-scenario 8.9.0 (required byops[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 trustis still required; the charms still patch labels through lightkube.Testing Instructions
For
coordinatorandworker:tox -e lint,static,unit(coordinatorunitincludes the interface tests), plustox -e interfacein 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.