|
25 | 25 |
|
26 | 26 | set -eux |
27 | 27 |
|
| 28 | +K8S_BASE_NAME=${K8S_NAME:-k8s} |
28 | 29 | git_repo_root=$(git rev-parse --show-toplevel) |
29 | 30 | kube_config_path=${git_repo_root}/k8s/kube-config.yaml |
30 | 31 | demo_yaml_path=${git_repo_root}/demo/yaml |
@@ -60,51 +61,51 @@ for region in eu us; do |
60 | 61 | # Deploy CloudNativePG operator (trunk - main branch) |
61 | 62 | curl -sSfL \ |
62 | 63 | https://raw.githubusercontent.com/cloudnative-pg/artifacts/main/manifests/operator-manifest.yaml | \ |
63 | | - kubectl --context kind-k8s-${region} apply -f - --server-side |
| 64 | + kubectl --context kind-${K8S_BASE_NAME}-${region} apply -f - --server-side |
64 | 65 | else |
65 | 66 | # Deploy CloudNativePG operator (latest version, through the plugin) |
66 | 67 | kubectl cnpg install generate --control-plane | \ |
67 | | - kubectl --context kind-k8s-${region} apply -f - --server-side |
| 68 | + kubectl --context kind-${K8S_BASE_NAME}-${region} apply -f - --server-side |
68 | 69 | fi |
69 | 70 |
|
70 | 71 | # Wait for CNPG deployment to complete |
71 | | - kubectl --context kind-k8s-${region} rollout status deployment \ |
| 72 | + kubectl --context kind-${K8S_BASE_NAME}-${region} rollout status deployment \ |
72 | 73 | -n cnpg-system cnpg-controller-manager |
73 | 74 |
|
74 | 75 | # Deploy cert-manager |
75 | | - kubectl apply --context kind-k8s-${region} -f \ |
| 76 | + kubectl apply --context kind-${K8S_BASE_NAME}-${region} -f \ |
76 | 77 | https://github.com/cert-manager/cert-manager/releases/latest/download/cert-manager.yaml |
77 | 78 |
|
78 | 79 | # Wait for cert-manager deployment to complete |
79 | | - kubectl rollout --context kind-k8s-${region} status deployment \ |
| 80 | + kubectl rollout --context kind-${K8S_BASE_NAME}-${region} status deployment \ |
80 | 81 | -n cert-manager |
81 | | - cmctl check api --wait=2m --context kind-k8s-${region} |
| 82 | + cmctl check api --wait=2m --context kind-${K8S_BASE_NAME}-${region} |
82 | 83 |
|
83 | 84 | if [ $trunk -eq 1 ] |
84 | 85 | then |
85 | 86 | # Deploy Barman Cloud Plugin (trunk) |
86 | | - kubectl apply --context kind-k8s-${region} -f \ |
| 87 | + kubectl apply --context kind-${K8S_BASE_NAME}-${region} -f \ |
87 | 88 | https://raw.githubusercontent.com/cloudnative-pg/plugin-barman-cloud/refs/heads/main/manifest.yaml |
88 | 89 | else |
89 | 90 | # Deploy Barman Cloud Plugin (latest stable) |
90 | | - kubectl apply --context kind-k8s-${region} -f \ |
| 91 | + kubectl apply --context kind-${K8S_BASE_NAME}-${region} -f \ |
91 | 92 | https://github.com/cloudnative-pg/plugin-barman-cloud/releases/latest/download/manifest.yaml |
92 | 93 | fi |
93 | 94 |
|
94 | 95 | # Wait for Barman Cloud Plugin deployment to complete |
95 | | - kubectl rollout --context kind-k8s-${region} status deployment \ |
| 96 | + kubectl rollout --context kind-${K8S_BASE_NAME}-${region} status deployment \ |
96 | 97 | -n cnpg-system barman-cloud |
97 | 98 |
|
98 | 99 | # Create Barman object stores |
99 | | - kubectl apply --context kind-k8s-${region} -f \ |
| 100 | + kubectl apply --context kind-${K8S_BASE_NAME}-${region} -f \ |
100 | 101 | ${demo_yaml_path}/object-stores |
101 | 102 |
|
102 | 103 | # Create the Postgres cluster |
103 | | - kubectl apply --context kind-k8s-${region} -f \ |
| 104 | + kubectl apply --context kind-${K8S_BASE_NAME}-${region} -f \ |
104 | 105 | ${demo_yaml_path}/${region}/pg-${region}${legacy}.yaml |
105 | 106 |
|
106 | 107 | # Wait for the cluster to be ready |
107 | | - kubectl wait --context kind-k8s-${region} \ |
| 108 | + kubectl wait --context kind-${K8S_BASE_NAME}-${region} \ |
108 | 109 | --timeout 30m \ |
109 | 110 | --for=condition=Ready cluster/pg-${region} |
110 | 111 |
|
|
0 commit comments