Skip to content
Snippets Groups Projects
Commit 8a00e59f authored by escaleira's avatar escaleira Committed by garciadav
Browse files

Bug 1991 fixed: modified LCM charm secret name to a standardized one


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: escaleira's avatarPedro Escaleira <escaleira@av.it.pt>
parent 950baea7
No related branches found
No related tags found
No related merge requests found
......@@ -212,9 +212,9 @@ class LcmCharm(CharmedOsmBase):
)
# 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,
......@@ -253,7 +253,7 @@ class LcmCharm(CharmedOsmBase):
}
)
container_builder.add_secret_envs(
secret_name=lcm_secret_name,
secret_name=mongodb_secret_name,
envs={
"OSMLCM_DATABASE_URI": "uri",
"OSMLCM_DATABASE_COMMONKEY": "commonkey",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment