File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22
33K3D_CLUSTER_NAME=${K3D_CLUSTER_NAME:- " local" }
44
5- if [ " $( k3d cluster list | grep -o -E " ^${K3D_CLUSTER_NAME} " ) " ] ; then
5+ if k3d cluster list | grep -q - o -E " ^${K3D_CLUSTER_NAME} " ; then
66 set +e
7- namespaces=$( tk env list --json | jq -r ' .[].spec .namespace' | sort | uniq )
7+ namespaces=" $( find rendered -type f -path ' */manifests/*.yaml ' -print0 | xargs -0 -P1 yq eval-all --output-format csv ' [.metadata .namespace] | map(select(. != null)) ' | tr ' , ' ' \n ' | sort -u ) "
88 while IFS= read -r namespace; do
99 echo " Creating namespace $namespace ....."
10- out=$( kubectl --context k3d-${K3D_CLUSTER_NAME} create namespace $namespace 2>&1 )
10+ out=$( kubectl --context " k3d-${K3D_CLUSTER_NAME} " create namespace " $namespace " 2>&1 )
1111 if [[ " $out " == * " AlreadyExists" * ]]; then
1212 echo " Namespace $namespace already exists, skipping"
1313 else
You can’t perform that action at this time.
0 commit comments