From 8a00e59f4f7928dfb0208c2eaa5efc8fe1666452 Mon Sep 17 00:00:00 2001 From: Pedro Escaleira Date: Fri, 15 Apr 2022 14:54:52 +0100 Subject: [PATCH] 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 `-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 --- installers/charm/lcm/src/charm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installers/charm/lcm/src/charm.py b/installers/charm/lcm/src/charm.py index 16e6f89f..7c644189 100755 --- a/installers/charm/lcm/src/charm.py +++ b/installers/charm/lcm/src/charm.py @@ -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", -- 2.17.1