@@ -109,7 +109,7 @@ patch_file() {
109109
110110echo " Scanning and patching files..."
111111
112- # Process values.yaml files
112+ # Process all target files ( values.yaml, Chart.yaml, templates/*.yaml)
113113while IFS= read -r -d ' ' file; do
114114 file_count=$(( file_count + 1 ))
115115 patch_file " $file " && rc=$? || rc=$?
@@ -118,29 +118,7 @@ while IFS= read -r -d '' file; do
118118 elif [[ $rc -eq 2 ]]; then
119119 skipped_count=$(( skipped_count + 1 ))
120120 fi
121- done < <( find " $CHARTS_DIR " -name " values.yaml" -print0)
122-
123- # Process Chart.yaml files
124- while IFS= read -r -d ' ' file; do
125- file_count=$(( file_count + 1 ))
126- patch_file " $file " && rc=$? || rc=$?
127- if [[ $rc -eq 0 ]]; then
128- patched_count=$(( patched_count + 1 ))
129- elif [[ $rc -eq 2 ]]; then
130- skipped_count=$(( skipped_count + 1 ))
131- fi
132- done < <( find " $CHARTS_DIR " -name " Chart.yaml" -print0)
133-
134- # Process template files (for direct image references)
135- while IFS= read -r -d ' ' file; do
136- file_count=$(( file_count + 1 ))
137- patch_file " $file " && rc=$? || rc=$?
138- if [[ $rc -eq 0 ]]; then
139- patched_count=$(( patched_count + 1 ))
140- elif [[ $rc -eq 2 ]]; then
141- skipped_count=$(( skipped_count + 1 ))
142- fi
143- done < <( find " $CHARTS_DIR " -path " */templates/*.yaml" -print0)
121+ done < <( find " $CHARTS_DIR " \( -name " values.yaml" -o -name " Chart.yaml" -o -path " */templates/*.yaml" \) -print0)
144122
145123echo
146124echo " === Patching Summary ==="
0 commit comments