-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DPE-1766] Juju 3 peer secrets #121
Conversation
4aad3b1
to
425b22e
Compare
385f642
to
c882f60
Compare
def _normalize_secret_key(self, key: str) -> str: | ||
new_key = key.replace("_", "-") | ||
new_key = new_key.strip("-") | ||
|
||
return new_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PGB is storing relation based secrets with generated names, so we cannot simply use an override mapping.
- name: Dump logs | ||
uses: canonical/charm-logdump-action@main | ||
if: failure() | ||
with: | ||
app: pgbouncer-k8s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to be doing anything useful.
if not (password := self.charm.get_secret(APP_SCOPE, user)): | ||
password = pgb.generate_password() | ||
self.charm.peers.add_user(user, password) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If password is already generated and set, don't regenerate it. This was causing the consistent mattermost failures.
Issue
Charm doesn't use secrets for internal sensitive values
Solution