52cd767c84
We recently re-worked all the deployment jobs so they use `deploy-env` Ansible role which works for both multi-node and single-node environments. This means there is no need to have diffrent sets of scripts for these two cases. Also when we deploy Openstack components it is better to have values overrides for different scenarios but not different sets of scripts. Here we remove unused deployment scripts which in many cases duplicated the code base. We will be cleaning up the code base even further to provide excelent user experience. Change-Id: Iacda03964a4dd0e60873593df9f590ce20504f2f
45 lines
1.6 KiB
Bash
Executable File
45 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
|
|
# This test confirms that upgrading a OpenStack Umbrella Helm release using
|
|
# --reuse-values does not result in any unexpected pods from being recreated.
|
|
# Ideally, no pods would be created if the upgrade has no configuration change.
|
|
# Unfortunately, some jobs have hooks defined such that each Helm release deletes
|
|
# and recreates jobs. These jobs are ignored in this test.
|
|
# This test aims to validate no Deployment, DaemonSet, or StatefulSet pods are
|
|
# changed by verifying the Observed Generation remains the same.
|
|
|
|
# This test case is proven by:
|
|
# 1. getting the list of DaemonSets, Deployment, StatefulSets after an installation
|
|
# 2. performing a helm upgrade with --reuse-values
|
|
# 3. getting the list of DaemonSets, Deployment, StatefulSets after the upgrade
|
|
# 4. Verifying the list is empty since no applications should have changed
|
|
|
|
before_apps_list="$(mktemp)"
|
|
after_apps_list="$(mktemp)"
|
|
|
|
kubectl get daemonsets,deployments,statefulsets \
|
|
--namespace openstack \
|
|
--no-headers \
|
|
--output custom-columns=Kind:.kind,Name:.metadata.name,Generation:.status.observedGeneration \
|
|
> "$before_apps_list"
|
|
|
|
helm upgrade openstack ./openstack \
|
|
--namespace openstack \
|
|
--reuse-values \
|
|
--wait
|
|
|
|
kubectl get daemonsets,deployments,statefulsets \
|
|
--namespace openstack \
|
|
--no-headers \
|
|
--output custom-columns=Kind:.kind,Name:.metadata.name,Generation:.status.observedGeneration \
|
|
> "$after_apps_list"
|
|
|
|
# get list of apps that exist in after list, but not in before list
|
|
changed_apps="$(comm -13 "$before_apps_list" "$after_apps_list")"
|
|
|
|
if [ "x$changed_apps" != "x" ]; then
|
|
echo "Applications changed unexpectedly: $changed_apps"
|
|
exit 1
|
|
fi
|