Skip to content

Commit f26bdb3

Browse files
authored
Merge pull request #7225 from Jont828/tilt-namespace
🐛 Fix bug in Tilt where Cluster template namespace is ignored
2 parents cd9e8e5 + 7e5d5d0 commit f26bdb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def deploy_clusterclass(clusterclass_name, label, filename, substitutions):
579579
)
580580

581581
def deploy_cluster_template(template_name, label, filename, substitutions):
582-
apply_cluster_template_cmd = "CLUSTER_NAME=" + template_name + "-$RANDOM;" + clusterctl_cmd + " generate cluster $CLUSTER_NAME --from " + filename + " | " + kubectl_cmd + " apply -f - && echo \"Cluster '$CLUSTER_NAME' created, don't forget to delete\n\""
582+
apply_cluster_template_cmd = "CLUSTER_NAME=" + template_name + "-$RANDOM;" + clusterctl_cmd + " generate cluster -n $NAMESPACE $CLUSTER_NAME --from " + filename + " | " + kubectl_cmd + " apply -f - && echo \"Cluster '$CLUSTER_NAME' created, don't forget to delete\n\""
583583
delete_clusters_cmd = 'DELETED=$(echo "$(bash -c "' + kubectl_cmd + ' --namespace=$NAMESPACE get clusters -A --no-headers -o custom-columns=":metadata.name"")" | grep -E "^' + template_name + '-[[:digit:]]{1,5}$"); if [ -z "$DELETED" ]; then echo "Nothing to delete for cluster template ' + template_name + '"; else echo "Deleting clusters:\n$DELETED\n"; echo $DELETED | xargs -L1 ' + kubectl_cmd + ' delete cluster; fi; echo "\n"'
584584

585585
local_resource(

0 commit comments

Comments
 (0)