Feat/get configuration action#609
Open
minulo wants to merge 3 commits into
Open
Conversation
Add a get-configuration Juju action so operators can inspect the effective haproxy configuration for debugging without shell access to the unit. - source=disk (default): return the applied /etc/haproxy/haproxy.cfg - source=relations: preview the configuration the next reconcile would generate from the current haproxy-route relation data (read-only; no file writes or service reload) - Log a warning when the effective configuration matches the default (no proxy backends configured) and, in relations mode, when a haproxy-route-policy relation makes the policy backend converge asynchronously (source=disk stays authoritative) - Extract shared template-context and render-to-string helpers so the reconcile and preview paths cannot drift AI-assisted.
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.
What this PR does
Add a get-configuration Juju action so operators can inspect the effective haproxy configuration for debugging without shell access to the unit.
Why we need it
The haproxy charm creates configuration based on its haproxy-route, haproxy-route-policy, and haproxy-route-tcp relations, but there is no way to inspect the effective configuration without shell access to the unit. This spec proposes a get-configuration Juju Action that returns the charm’s configuration out to stdout by both reading from disk and calculating the potential resulting configuration based on current relations.
Checklist
docs/changelog.mdwith user-relevant changesdocs/release-notes/artifacts. If no change artifact is necessary, I tagged the PR with the labelno-release-note.