This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
Fix config and credential changes not being sent to Kubernetes charms #40
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.
Partial fix for https://bugs.launchpad.net/bugs/1915557
Depends on juju-solutions/interface-azure-integration#8
When cloud configuration or credentials change, resend cloud data to units whose requests have already been processed.
There's a bit of nasty stuff in here to handle the variety of cases in which cloud credentials can change. From a high level, here's what you need to know:
juju config azure-integrator <foo>
), then the charm'sconfig-changed
hook will run, with theconfig.changed
flag set, and that will causehandle_requests
to run and refresh requests.juju update-credential
, Juju will not inform the charm that those credentials have changed. So we monitor for changes on theupdate-status
hook instead, which ensures that the credentials will at least be updated eventually (typically within 5 minutes).refresh-credentials
action to force an immediate refresh of the credentials.