refactor: adopt single-kernel update_config and tls_files_pushed reload#1849
Draft
marceloneppel wants to merge 3 commits into
Draft
refactor: adopt single-kernel update_config and tls_files_pushed reload#1849marceloneppel wants to merge 3 commits into
marceloneppel wants to merge 3 commits into
Conversation
2 tasks
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
from
July 20, 2026 19:13
2abf30d to
8d2f8c8
Compare
2 tasks
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
from
July 20, 2026 20:35
8d2f8c8 to
7a2e2e0
Compare
Delegate update_config to the library's ConfigManager (constructor-injected with tls_manager, patroni_manager, and the three charm-owned bridges request_restart/refresh_endpoints/restart_services), and remove the charm's own copy of the subsystem plus templates/patroni.yml.j2 (the library owns them). Pin the library at the archive of the update_config + tls_files_pushed stack (v16.3.5). Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…lable The lib TLS handler now emits tls_files_pushed after a successful cert push. Observe that single event instead of certificate_available/relation_broken on both requirers, and drop the two guards (internal-ca present, cert files on disk) the bridge duplicated from the handler: the event fires only once the push has landed, so a deferred push no longer lets the bridge reload against stale files. Re-pin the lib to the commit that adds the event. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
from
July 21, 2026 20:27
7a2e2e0 to
5fe60ed
Compare
The lib moved K8s resource introspection off the workload onto K8sManager and now sources this unit's (cpu, memory) through CharmState.available_resources, backed by a per-substrate provider (review response on the parameter-building PR). Re-pin the lib to the rebased stack top and wire the VM workload as the state's resource_provider so update_config's config sizing keeps working. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
from
July 23, 2026 18:18
130279e to
71f6116
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
The VM charm carried its own copy of the
update_configsubsystem (PostgreSQL parameter building →patroni.ymlrender → Patroni REST config patch → reload/restart decision → config-hash persistence), and its TLS reload bridge observedcertificate_availabledirectly. Both now live in thepostgresql-charms-single-kernellibrary; this PR makes the charm consume them.Solution
ConfigManager(constructor-injected withtls_manager,patroni_manager, and the three charm-owned bridgesrequest_restart/refresh_endpoints/restart_services); remove the charm's own copy of the subsystem andtemplates/patroni.yml.j2(the library owns them).tls_files_pushedevent instead of the fourcertificate_available/relation_brokenobservers, and drop the two guards (internal-capresent,client_tls_files_on_disk()) the bridge duplicated — the event fires only after a successful push, so a deferred push no longer triggers a reload against files that were never written.tls_files_pushedstack (v16.3.5).Targets
16/edgedirectly (rebased on the library's merged base). Draft until the library releases and the pin flips toversion="16.3.5".Checklist