canonical / canonical/mysql-proxy-operator
Refactor mysql-proxy db secrets storage
- Dominant language
- Python
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the mysql-proxy operator does 2x the secrets storage for the same information.
After deploying the mysql-proxy operator, I see
```bash
$ juju secrets
ID Name Owner Rotation Revision Last updated
d30q67vja7veke2sbug0 mysql-proxy-db-uri never 1 21 hours ago
d30rn1nja7veke2sburg - mysql-proxy never 1 21 hours ago
```
### Secret # 1
```bash
secret_id=$(juju add-secret mysql-proxy-db-uri db-uri="mysql://user:pass@host:port/slurm_acct_db_production")
```
```bash
$ juju show-secret d30q67vja7veke2sbug0 --reveal
d30q67vja7veke2sbug0:
revision: 1
checksum: e1cd5c4d88f3e454d6dd3b98a9965e858efdc36edfcf3f0b66b918f0267b8b0b
owner:
name: mysql-proxy-db-uri
created: 2025-09-10T16:11:12Z
updated: 2025-09-10T16:11:12Z
content:
db-uri: mysql://user:pass@host:port/slurm_acct_db_production
access:
- target: application-mysql-proxy
scope: model-ef435d4b-28ea-4fa6-8f37-2ec249809d23
role: view
```
### Secret # 2
```bash
$ juju show-secret d30rn1nja7veke2sburg --reveal
d30rn1nja7veke2sburg:
revision: 1
checksum: 05f1738b98e599646e0c28c9aa8ffde11a832e0129dafe65cdbeace14900fcc4
owner: mysql-proxy
label: database.24.user.secret
created: 2025-09-10T17:55:19Z
updated: 2025-09-10T17:55:19Z
content:
password: pass
username: user
access:
- target: application-slurmdbd
scope: relation-slurmdbd.database#mysql-proxy.database
role: view
```
Can we consolidate all this into a mysql-proxy action that sets the information in the secrets storage only 1time? This would allow us to use secrets api to react to changes/expirations in the secrets and track only 1 copy of the information.
Contributor guide
Assessment
This issue has not been assessed yet.