Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change helm to helm3 #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/envoy_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def deploy(self, namespace, enable_envoy_admin):
else:
process = "upgrade"

command = "helm {0} --timeout 180s {1} {2} --namespace {3} --set envoyAdmin.enabled='{4}'".format(process, self.release_name,
command = "helm3 {0} --timeout 180s {1} {2} --namespace {3} --set envoyAdmin.enabled='{4}'".format(process, self.release_name,
self.helm_chart_path, namespace, enable_envoy_admin)
cmd_runner(command, "Envoy")

Expand Down
10 changes: 5 additions & 5 deletions scripts/language_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def deploy(self, namespace, api_changed, gpu_count, enable_gpu, cpu_count, image
if is_deployed == True:
process = "upgrade"
if api_changed == True:
uninstall_command = "helm uninstall {0} --namespace {1}".format(self.release_name,
uninstall_command = "helm3 uninstall {0} --namespace {1}".format(self.release_name,
namespace)
cmd_runner(uninstall_command, "LANGUAGE :" + self.language_code)
process = "install"
Expand All @@ -60,7 +60,7 @@ def deploy(self, namespace, api_changed, gpu_count, enable_gpu, cpu_count, image

pull_policy = "Always" if api_changed == True else "IfNotPresent"

command = "helm {0} --timeout 180s {1} {2} --namespace {3} --set env.languages='[\"{4}\"]' --set " \
command = "helm3 {0} --timeout 180s {1} {2} --namespace {3} --set env.languages='[\"{4}\"]' --set " \
"image.pullPolicy='{5}' --set image.repository='{6}' --set image.tag='{7}'".format(
process, self.release_name, self.helm_chart_path, namespace, self.language_code,
pull_policy, image_name,
Expand All @@ -83,7 +83,7 @@ def __init__(self, language_code_list, base_name, helm_chart_path):
print("Release name", self.release_name)

def is_deployed(self, namespace):
result = subprocess.getoutput('helm status {} -n {} --output yaml'.format(self.release_name, namespace))
result = subprocess.getoutput('helm3 status {} -n {} --output yaml'.format(self.release_name, namespace))
if "release: not found" in result.lower():
return False
else:
Expand All @@ -105,7 +105,7 @@ def deploy(self, namespace, api_changed, gpu_count, enable_gpu, cpu_count, image
if is_deployed == True:
process = "upgrade"
if api_changed == True:
uninstall_command = "helm uninstall {0} --namespace {1}".format(self.release_name, namespace)
uninstall_command = "helm3 uninstall {0} --namespace {1}".format(self.release_name, namespace)
cmd_runner(uninstall_command, "LANGUAGE :" + ",".join(self.language_code_list))
process = "install"
else:
Expand All @@ -115,7 +115,7 @@ def deploy(self, namespace, api_changed, gpu_count, enable_gpu, cpu_count, image

languages = ["\"{}\"".format(x) for x in self.language_code_list]
languages = "\,".join(languages)
command = "helm {0} --timeout 180s {1} {2} --namespace {3} --set env.languages='[{4}]' --set " \
command = "helm3 {0} --timeout 180s {1} {2} --namespace {3} --set env.languages='[{4}]' --set " \
"image.pullPolicy='{5}' --set image.repository='{6}' --set image.tag='{7}'".format(
process, self.release_name, self.helm_chart_path, namespace, languages, pull_policy, image_name,
image_version)
Expand Down