diff --git a/scripts/cluster/bootstrap-platform.sh b/scripts/cluster/bootstrap-platform.sh index d226660..4f26d7e 100755 --- a/scripts/cluster/bootstrap-platform.sh +++ b/scripts/cluster/bootstrap-platform.sh @@ -46,20 +46,22 @@ source "$postgres_environment" exit 1 } -declare -A operator_urls=( - [cert-manager.yaml]=https://github.com/cert-manager/cert-manager/releases/download/v1.21.0/cert-manager.yaml - [cnpg.yaml]=https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.29/releases/cnpg-1.29.1.yaml - [barman.yaml]=https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.13.0/manifest.yaml +operators=(cert-manager.yaml cnpg.yaml barman.yaml) +operator_urls=( + https://github.com/cert-manager/cert-manager/releases/download/v1.21.0/cert-manager.yaml + https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.29/releases/cnpg-1.29.1.yaml + https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.13.0/manifest.yaml ) -declare -A operator_checksums=( - [cert-manager.yaml]=6e499c3f1ab356abe79a7853911f80cb09c213885bfdf81092fdff142ba63c4a - [cnpg.yaml]=e0c5ff41bf5b01c0775bf225929b8423d543cd23e9742e4274fe7de8499cf93a - [barman.yaml]=d2e71e7b06822448f1a421f05781846cfdb9cc621e7ef32eef5e20c5133213b0 +operator_checksums=( + 6e499c3f1ab356abe79a7853911f80cb09c213885bfdf81092fdff142ba63c4a + e0c5ff41bf5b01c0775bf225929b8423d543cd23e9742e4274fe7de8499cf93a + d2e71e7b06822448f1a421f05781846cfdb9cc621e7ef32eef5e20c5133213b0 ) -for operator in cert-manager.yaml cnpg.yaml barman.yaml; do - curl -fsSL "${operator_urls[$operator]}" -o "$working_directory/$operator" +for index in 0 1 2; do + operator=${operators[$index]} + curl -fsSL "${operator_urls[$index]}" -o "$working_directory/$operator" actual_checksum=$(shasum -a 256 "$working_directory/$operator" | awk '{print $1}') - [[ $actual_checksum == "${operator_checksums[$operator]}" ]] || { + [[ $actual_checksum == "${operator_checksums[$index]}" ]] || { echo "operator manifest checksum mismatch: $operator" >&2 exit 1 }