From: David Garcia Date: Thu, 16 Jul 2020 12:51:49 +0000 (+0200) Subject: Remove api_proxy from osm bundles X-Git-Tag: v8.0.0rc3~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F33%2F9433%2F4;p=osm%2Fdevops.git Remove api_proxy from osm bundles Change-Id: I942df7a05859f78ef1dd433e55985fa03b514219 Signed-off-by: David Garcia --- diff --git a/installers/charm/bundles/osm-ha/bundle.yaml b/installers/charm/bundles/osm-ha/bundle.yaml index c6f0249d..9976679d 100644 --- a/installers/charm/bundles/osm-ha/bundle.yaml +++ b/installers/charm/bundles/osm-ha/bundle.yaml @@ -145,7 +145,6 @@ applications: vca_password: secret vca_pubkey: pubkey vca_cacert: cacert - vca_apiproxy: apiproxy use_external_vca: true DATABASE_COMMONKEY: osm annotations: diff --git a/installers/charm/bundles/osm/bundle.yaml b/installers/charm/bundles/osm/bundle.yaml index 7f712e29..6207fd88 100644 --- a/installers/charm/bundles/osm/bundle.yaml +++ b/installers/charm/bundles/osm/bundle.yaml @@ -145,7 +145,6 @@ applications: vca_password: secret vca_pubkey: pubkey vca_cacert: cacert - vca_apiproxy: apiproxy use_external_vca: false DATABASE_COMMONKEY: osm annotations: diff --git a/installers/charm/lcm-k8s/reactive/lcm.py b/installers/charm/lcm-k8s/reactive/lcm.py index 85ec9c5b..3ada8cb2 100644 --- a/installers/charm/lcm-k8s/reactive/lcm.py +++ b/installers/charm/lcm-k8s/reactive/lcm.py @@ -21,7 +21,7 @@ from charmhelpers.core.hookenv import ( config, ) from charms import layer - +import yaml @hook("upgrade-charm") @when("leadership.is_leader") @@ -131,4 +131,7 @@ def make_pod_spec(ro_host, ro_port, kafka_host, kafka_port, mongo_uri): } data.update(cfg) - return pod_spec_template % data + spec = yaml.safe_dump(pod_spec_template % data) + if "vca_apiproxy" in cfg and cfg["vca_apiproxy"] != "": + spec["containers"][0]["config"]["OSMLCM_VCA_APIPROXY"] = cfg["vca_apiproxy"] + return spec \ No newline at end of file diff --git a/installers/charm/lcm-k8s/reactive/spec_template.yaml b/installers/charm/lcm-k8s/reactive/spec_template.yaml index 82a76e09..d8b51e77 100644 --- a/installers/charm/lcm-k8s/reactive/spec_template.yaml +++ b/installers/charm/lcm-k8s/reactive/spec_template.yaml @@ -45,6 +45,5 @@ containers: OSMLCM_VCA_PUBKEY: %(vca_pubkey)s OSMLCM_VCA_SECRET: %(vca_password)s OSMLCM_VCA_CACERT: %(vca_cacert)s - OSMLCM_VCA_APIPROXY: %(vca_apiproxy)s OSMLCM_VCA_CLOUD: %(vca_cloud)s OSMLCM_VCA_K8S_CLOUD: %(vca_k8s_cloud)s