X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2common%2Fconfig%2Fconfig.py;fp=o2common%2Fconfig%2Fconfig.py;h=64bf3ebbb53d3161cfe81d83e736300af4b6b6d2;hb=ad15ec6b732868c3ecedb9cd84450462bafa3320;hp=8f44fa22a5089d9e7b5a422003eeba141e11dde7;hpb=f113db48acbe73641ce7d13c1cb8be6eea147f98;p=pti%2Fo2.git diff --git a/o2common/config/config.py b/o2common/config/config.py index 8f44fa2..64bf3eb 100644 --- a/o2common/config/config.py +++ b/o2common/config/config.py @@ -207,3 +207,17 @@ def gen_k8s_config_dict(cluster_api_endpoint, cluster_ca_cert, admin_user, } return data + + +def get_helmcli_access(): + host_external = os.environ.get("API_HOST_EXTERNAL_FLOATING") + host = "127.0.0.1" if host_external is None or host_external == '' \ + else host_external + port = "10022" if host_external is None or host_external == '' \ + else "50022" + + helm_host_with_port = host+':'+port + helm_user = 'helm' + helm_pass = os.environ.get("HELM_USER_PASSWD") + + return helm_host_with_port, helm_user, helm_pass