diff --git a/installers/charm/bundles/osm-ha/bundle.yaml b/installers/charm/bundles/osm-ha/bundle.yaml index c6f0249dcdfbabd0bf41451988623f72c3b95fd5..9976679de7e6f56a4068806ac8e814fe18daf20b 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 7f712e29dab06a782e034fd4df99608404cc2e8c..6207fd88c5d08d8ed7247016a6dc7fb17267573c 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 85ec9c5b0cd311b09108eeaafa8298c785c8fff2..3ada8cb27395e40501a5aac9c4fbc932145e3d7d 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 82a76e09060049903e09f912161e8e82e4d98cca..d8b51e77af310f53bc2371abb26ad401fc77a039 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