Switch mysql and postgresql tests to HA Production configs (#471)
Signed-off-by: Kevin Fox <[email protected]>
This commit is contained in:
@@ -12,31 +12,35 @@ source "${SCRIPTPATH}/../../.github/scripts/parse-versions.sh"
|
||||
# shellcheck source=/dev/null
|
||||
source "${TESTDIR}/common.sh"
|
||||
|
||||
helm_install=(helm upgrade --install --create-namespace)
|
||||
ns=spire-system
|
||||
|
||||
teardown() {
|
||||
helm uninstall --namespace "${ns}" spire 2>/dev/null || true
|
||||
kubectl delete ns "${ns}" 2>/dev/null || true
|
||||
|
||||
helm uninstall --namespace "spire-server" spire 2>/dev/null || true
|
||||
helm uninstall --namespace mysql mysql 2>/dev/null || true
|
||||
kubectl delete ns mysql 2>/dev/null || true
|
||||
kubectl delete ns spire-server 2>/dev/null || true
|
||||
kubectl delete ns spire-system 2>/dev/null || true
|
||||
}
|
||||
|
||||
trap 'trap - SIGTERM && teardown' SIGINT SIGTERM EXIT
|
||||
|
||||
"${helm_install[@]}" mysql mysql --version "$VERSION_MYSQL" --repo "$HELM_REPO_MYSQL" \
|
||||
--namespace mysql \
|
||||
kubectl create namespace spire-system --dry-run=client -o yaml | kubectl apply -f -
|
||||
kubectl label namespace spire-system pod-security.kubernetes.io/enforce=privileged || true
|
||||
kubectl create namespace spire-server --dry-run=client -o yaml | kubectl apply -f -
|
||||
kubectl label namespace spire-server pod-security.kubernetes.io/enforce=restricted || true
|
||||
|
||||
helm upgrade --install mysql mysql --version "$VERSION_MYSQL" --repo "$HELM_REPO_MYSQL" \
|
||||
--namespace spire-server \
|
||||
--values "${DEPS}/mysql.yaml" \
|
||||
--wait
|
||||
|
||||
"${helm_install[@]}" --namespace "${ns}" --values "${SCRIPTPATH}/values.yaml" \
|
||||
helm upgrade --install --namespace "spire-server" \
|
||||
--values "${SCRIPTPATH}/values.yaml,${SCRIPTPATH}/../production/values.yaml,${SCRIPTPATH}/../production/values-node-pod-antiaffinity.yaml" \
|
||||
--set 'spire-server.dataStore.sql.password=sp1ff3Test' --wait spire charts/spire
|
||||
helm test --namespace "${ns}" spire
|
||||
helm test --namespace "spire-server" spire
|
||||
|
||||
print_helm_releases
|
||||
print_spire_workload_status "${ns}"
|
||||
print_spire_workload_status spire-server
|
||||
print_spire_workload_status spire-system
|
||||
|
||||
if [[ "$1" -ne 0 ]]; then
|
||||
get_namespace_details "${ns}"
|
||||
get_namespace_details spire-server
|
||||
get_namespace_details spire-system
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user