Previously, the LCM charm was creating a Kubernetes secret with the name
`lcm-lcm-secret`, to save the credentials for accessing Mongo, while the
other modules' charms where using a name with the format
`<mod_name>-mongodb-secret` to do so. This modification updates the LCM charm
to create this secret in a compliant way with this name format.
Change-Id: I4d91e760e44d1703f246e605d9b70625967556c5
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
)
# Add secrets to the pod
- lcm_secret_name = f"{self.app.name}-lcm-secret"
+ mongodb_secret_name = f"{self.app.name}-mongodb-secret"
pod_spec_builder.add_secret(
- lcm_secret_name,
+ mongodb_secret_name,
{
"uri": config.mongodb_uri or self.mongodb_client.connection_string,
"commonkey": config.database_commonkey,
}
)
container_builder.add_secret_envs(
- secret_name=lcm_secret_name,
+ secret_name=mongodb_secret_name,
envs={
"OSMLCM_DATABASE_URI": "uri",
"OSMLCM_DATABASE_COMMONKEY": "commonkey",