diff --git a/scripts/validate-charts b/scripts/validate-charts index 088cc3e9c13..d71823752fb 100755 --- a/scripts/validate-charts +++ b/scripts/validate-charts @@ -51,7 +51,7 @@ check_system_registry() { chart_tmp=$3 yaml_tmp=$(mktemp --suffix .yaml) - values="global.systemDefaultRegistry=my-registry,global.cattle.systemDefaultRegistry=my-registry,vCenter.clusterId=test-id" + values="global.systemDefaultRegistry=my-registry,global.cattle.systemDefaultRegistry=my-registry,vCenter.clusterId=test-id,global.clusterDNS=10.43.0.10" helm template test-chart --kube-version ${KUBERNETES_VERSION} --set $values $chart_tmp > $yaml_tmp; awk '$1 ~ /^image:/ { @@ -60,6 +60,9 @@ check_system_registry() { } } ' $yaml_tmp + + #clean-up + rm -f $yaml_tmp } is_supported() { @@ -110,7 +113,7 @@ check_airgap() { chart_tmp=$3 yaml_tmp=$(mktemp --suffix .yaml) - values="vCenter.clusterId=test-id" + values="vCenter.clusterId=test-id,global.clusterDNS=10.43.0.10" helm template test-chart --kube-version ${KUBERNETES_VERSION} --set $values $chart_tmp > $yaml_tmp; chart_folder=$(mktemp -d) @@ -120,7 +123,7 @@ check_airgap() { print $3 " " $5 } ' $chart_folder/$chart_name/Chart.yaml ` - if ! [ -z ${version_annotation} ]; then + if ! [[ -z ${version_annotation} ]]; then version_annotation=${version_annotation:0:-1} read lower_bound upper_bound <<< $version_annotation @@ -143,6 +146,9 @@ check_airgap() { echo $image fi done + + #clean-up + rm -f $yaml_tmp } declare -A NO_SYSTEM_REGISTRY