File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
modules/user_kustomizations Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 11locals {
22 sorted_kustomization_destination_folders = [
33 for idx in sort ([
4- for key , mod in module . user_kustomization_set : tonumber (key) if mod . files_count > 0
4+ for key , mod in module . user_kustomization_set : tonumber (key)
55 ]) :
66 module. user_kustomization_set [tostring (idx)]. destination_folder
77 ]
Original file line number Diff line number Diff line change @@ -42,8 +42,12 @@ resource "null_resource" "kustomization_user_deploy" {
4242 #!/bin/bash
4343 for dest_folder in ${ join (" " , local. sorted_kustomization_destination_folders )} ; do
4444 if [ -d "$dest_folder" ]; then
45- echo "Applying kustomization from $dest_folder"
46- kubectl apply -k "$dest_folder"
45+ if [ -f "$dest_folder/kustomization.yaml" ]; then
46+ echo "Applying kustomization from $dest_folder"
47+ kubectl apply -k "$dest_folder"
48+ else
49+ echo "No kustomization.yaml in $dest_folder, skipping apply."
50+ fi
4751 echo "Running post-install script from $dest_folder"
4852 /bin/bash "$dest_folder/postinstall.sh"
4953 fi
You can’t perform that action at this time.
0 commit comments