diff --git a/WIP-CHANGELOG.md b/WIP-CHANGELOG.md index e69de29bb2..d8b449d2f6 100644 --- a/WIP-CHANGELOG.md +++ b/WIP-CHANGELOG.md @@ -0,0 +1,3 @@ +### Changed + +- The dry-run and appy command now checks against the state of the cluster while ran. diff --git a/bin/dry-run.bash b/bin/dry-run.bash index db6d9672bb..361d690750 100755 --- a/bin/dry-run.bash +++ b/bin/dry-run.bash @@ -21,13 +21,13 @@ if [[ $1 == "sc" ]]; then log_info "Running helmfile diff on the service cluster" : "${config[config_file_sc]:?Missing service cluster config file}" - "${here}/ops.bash" helmfile sc diff + "${here}/ops.bash" helmfile sc template | kubectl diff -f - elif [[ $1 == "wc" ]]; then log_info "Running helmfile diff on the workload cluster" : "${config[config_file_wc]:?Missing workload cluster config file}" - "${here}/ops.bash" helmfile wc diff + "${here}/ops.bash" helmfile wc template | kubectl diff -f - else log_error "ERROR: unsupported option for dry-run. Supported options are " exit 1 diff --git a/scripts/deploy-sc.sh b/scripts/deploy-sc.sh index 0020327905..b3926cd02b 100755 --- a/scripts/deploy-sc.sh +++ b/scripts/deploy-sc.sh @@ -34,6 +34,6 @@ echo "Installing helm charts" >&2 cd "${SCRIPTS_PATH}/../helmfile" declare -a helmfile_opt_flags [[ -n "$INTERACTIVE" ]] && helmfile_opt_flags+=("$INTERACTIVE") -helmfile -f . -e service_cluster "${helmfile_opt_flags[@]}" apply --suppress-diff +helmfile -f . -e service_cluster "${helmfile_opt_flags[@]}" sync --suppress-diff echo "Deploy sc completed!" >&2 diff --git a/scripts/deploy-wc.sh b/scripts/deploy-wc.sh index 63338270f9..e52d1889ad 100755 --- a/scripts/deploy-wc.sh +++ b/scripts/deploy-wc.sh @@ -34,6 +34,6 @@ echo "Installing helm charts" >&2 cd "${SCRIPTS_PATH}/../helmfile" declare -a helmfile_opt_flags [[ -n "$INTERACTIVE" ]] && helmfile_opt_flags+=("$INTERACTIVE") -helmfile -f . -e workload_cluster "${helmfile_opt_flags[@]}" apply --suppress-diff +helmfile -f . -e workload_cluster "${helmfile_opt_flags[@]}" sync --suppress-diff echo "Deploy wc completed!" >&2