Change-Id: I942df7a05859f78ef1dd433e55985fa03b514219
Signed-off-by: David Garcia <david.garcia@canonical.com>
vca_password: secret
vca_pubkey: pubkey
vca_cacert: cacert
- vca_apiproxy: apiproxy
use_external_vca: true
DATABASE_COMMONKEY: osm
annotations:
vca_password: secret
vca_pubkey: pubkey
vca_cacert: cacert
- vca_apiproxy: apiproxy
use_external_vca: false
DATABASE_COMMONKEY: osm
annotations:
config,
)
from charms import layer
-
+import yaml
@hook("upgrade-charm")
@when("leadership.is_leader")
}
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
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