From: Pedro Escaleira Date: Fri, 15 Apr 2022 13:54:52 +0000 (+0100) Subject: Bug 1991 fixed: modified LCM charm secret name to a standardized one X-Git-Tag: v12.0.0rc1~19 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=8a00e59f4f7928dfb0208c2eaa5efc8fe1666452;p=osm%2Fdevops.git 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 --- 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",