Skip to content

Commit

Permalink
Merge pull request #9811 from fabriziopandini/fix-variables-names-in-…
Browse files Browse the repository at this point in the history
…tiltfile

🌱 fix variables names in Tiltfile
  • Loading branch information
k8s-ci-robot authored Dec 5, 2023
2 parents eae6b34 + 3e21efe commit 9bea739
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,11 @@ def deploy_templates(filename, label, substitutions):
basename = os.path.basename(filename)
if basename.endswith(".yaml"):
if basename.startswith("clusterclass-"):
template_name = basename.replace("clusterclass-", "").replace(".yaml", "")
deploy_clusterclass(template_name, label, filename, substitutions)
clusterclass_name = basename.replace("clusterclass-", "").replace(".yaml", "")
deploy_clusterclass(clusterclass_name, label, filename, substitutions)
elif basename.startswith("cluster-template-"):
clusterclass_name = basename.replace("cluster-template-", "").replace(".yaml", "")
deploy_cluster_template(clusterclass_name, label, filename, substitutions)
template_name = basename.replace("cluster-template-", "").replace(".yaml", "")
deploy_cluster_template(template_name, label, filename, substitutions)

def deploy_clusterclass(clusterclass_name, label, filename, substitutions):
apply_clusterclass_cmd = "cat " + filename + " | " + envsubst_cmd + " | " + kubectl_cmd + " apply --namespace=$NAMESPACE -f - && echo \"ClusterClass created from\'" + filename + "\', don't forget to delete\n\""
Expand Down

0 comments on commit 9bea739

Please sign in to comment.