-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Follow redirect - needed for repo move * Update metric used for cells (#4009) - `firehose_value_metric_rep_unhealthy_cell` deprecated, now use `firehose_value_metric_rep_garden_health_check_failed` - Try new metric first and fall back on old * Fix incorrect SSO behaviour following 2.4.0 --> 2.6.0 upgrade (#4015) - affects db migration of console config table to new config table - fixes #4013 * 2.6.1 Release preparation * Ingress fix (#4024) * Fixes ingress and kube 1.16 version issue * Update Changelog * More test * Fix ingress tests * Show more service instance last operation details * Show service instance service broker * Handle last operation & broker in table view * Show the service broker name in the service list service card * Mention STRATOS_BP_DEBUG to troubleshoot staging (#4039) * Backend changs to support long-running requests * Fix create service instance from service instance page * Fix unit tests * Ensure service plans are sorted by display name - sometimes these are fetched inline which aren't sorted * Fix helm chart issue with semver (#4046) * Handle Long Running Service Instance Operations - Some brokers take a long time to execute create, update and delete service instance operations - This time exceeded the amount allowed by browser/jetstream - We now provide a custom response to the front end when this happens - Front end then handles this and also shows a custom error message * Fixes post merge * Changes and tidy up post review - Use a common way to get a service name, service link, broker name - Split out cf specific long running functionality - Show service as a link in app service instance card - Show service plan and broker in app service instance card - Update the service instance entity on Update as well as Delete (will show a better 'last operation' value) * Fixes post merge * Fix failing unit tests * Improvements to error/notification process - Show mini error message, as per create, when updating service instance - Handle all 5XX status codes as errors - Update messages to reflect varience of error states - Show single popover message on error dismiss all button - Correct error page selector * Treat calls to multiple endpoints as `global` - calls where we generate the endpoint lists (app wall, etc) were handled badly by jetstreamErrorHandler - this was due to the internal event storing endpoint id as `` instead of one per endpoint - this happened due to the list of generated endpoints being applied directly to request object in lower function - treat these as global for the moment * More fixes * Fix failing e2e test * Show last operation and service broker info for service instances (#4038) * Show more service instance last operation details * Show service instance service broker * Handle last operation & broker in table view * Show the service broker name in the service list service card * Fix create service instance from service instance page * Fix unit tests * Fix failing e2e test * Fix bad merge * Fix failing tests Co-authored-by: Neil MacDougall <[email protected]> Co-authored-by: Guillaume Berche <[email protected]>
- Loading branch information
1 parent
337332f
commit cfeffa9
Showing
68 changed files
with
1,193 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
#!/bin/bash | ||
|
||
echo "=========================" | ||
echo "Stratos Helm Version Test" | ||
echo "=========================" | ||
|
||
# This scrips does dry-run installs using differnt Helm and Kube versions | ||
|
||
DIRPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
STRATOS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../../.. && pwd)" | ||
|
||
CYAN="\033[96m" | ||
YELLOW="\033[93m" | ||
RESET="\033[0m" | ||
BOLD="\033[1m" | ||
|
||
function log { | ||
MSG=$1 | ||
echo -e "${CYAN}${BOLD}${MSG}${RESET}" | ||
} | ||
|
||
declare -a HELM_VERSIONS=("3.0.0" "2.16.1" "2.15.2" "2.14.3") | ||
|
||
set -e | ||
|
||
# We should be running in the Stratos GitHub folder | ||
|
||
NAME=stratos-test | ||
NAMESPACE=stratos-ns | ||
HELM_REPO=https://cloudfoundry.github.io/stratos | ||
HELM_REPO_NAME=cfstratos | ||
|
||
TEMP_FOLDER=${STRATOS}/tmp/helm | ||
mkdir -p ${TEMP_FOLDER} | ||
|
||
log "Building Helm chart ..." | ||
pushd "${STRATOS}/deploy/kubernetes" > /dev/null | ||
./build.sh -c -t helmtest | ||
popd > /dev/null | ||
|
||
log "Preparing environment ..." | ||
|
||
pushd "${TEMP_FOLDER}" > /dev/null | ||
|
||
export HELM_HOME=${TEMP_FOLDER} | ||
|
||
function getKind { | ||
if [ ! -f "./kind" ]; then | ||
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.6.1/kind-$(uname)-amd64 | ||
chmod +x ./kind | ||
fi | ||
} | ||
|
||
function getHelm { | ||
UNAME=`uname | awk '{print tolower($0)}'` | ||
if [ ! -f "./helm_${1}" ]; then | ||
log "Getting helm version ${1} [${UNAME}]" | ||
curl -Lo ./helm_${1}.tar.gz https://get.helm.sh/helm-v${1}-${UNAME}-amd64.tar.gz | ||
tar -xvzf ./helm_${1}.tar.gz | ||
mv ./${UNAME}-amd64/helm ./helm_${1} | ||
chmod +x ./helm_${1} | ||
rm -rf ./helm_${1}.tar.gz | ||
rm -rf ./${UNAME}-amd64 | ||
fi | ||
} | ||
|
||
function getKubectl { | ||
UNAME=`uname | awk '{print tolower($0)}'` | ||
if [ ! -f "./kubectl_${2}" ]; then | ||
log "Getting kubectl version ${1}" | ||
curl -Lo ./kubectl_${2} https://storage.googleapis.com/kubernetes-release/release/v${1}/bin/${UNAME}/amd64/kubectl | ||
chmod +x ./kubectl_${2} | ||
fi | ||
} | ||
|
||
function cleanup { | ||
if [ -f "./kind" ]; then | ||
log "Cleaning up" | ||
./kind delete cluster | ||
fi | ||
} | ||
|
||
function wait_for_pods { | ||
DONE="false" | ||
NS="$1" | ||
|
||
echo "Waiting for all pods in namespace '$NS' to be ready" | ||
sleep 5 | ||
|
||
PROGRESS="." | ||
|
||
while [ $DONE != "true" ]; do | ||
PODS=`kubectl get po --namespace=$NS | wc -l` | ||
RUNNING=`kubectl get po --namespace=$NS | grep 'Running' | wc -l` | ||
COMPLETED=`kubectl get po --namespace=$NS | grep 'Completed' | wc -l` | ||
NOTREADY=`kubectl get po --namespace=$NS | grep '0//*' | wc -l` | ||
PODS=$((PODS-1)) | ||
OKAY=$((RUNNING+COMPLETED)) | ||
NOTREADY=$((NOTREADY-COMPLETED)) | ||
|
||
if [ "$PODS" == "$OKAY" ] && [ "$NOTREADY" == "0" ]; then | ||
echo "" | ||
echo "All pods are running" | ||
DONE="true" | ||
else | ||
kubectl get po --namespace=$NS | ||
echo "" | ||
printf "\r${PODS} pods ($RUNNING are running, $NOTREADY are not yet ready) $PROGRESS " | ||
printf "\r${PODS} pods ($RUNNING are running, $NOTREADY are not yet ready) $PROGRESS " | ||
PROGRESS="$PROGRESS." | ||
|
||
if [ ${#PROGRESS} -eq 10 ]; then | ||
PROGRESS="." | ||
fi | ||
fi | ||
|
||
echo "" | ||
|
||
sleep 5 | ||
done | ||
|
||
echo "Finished waiting for all pods in namespace '$NS'" | ||
} | ||
|
||
function do_chart_tests { | ||
|
||
|
||
log "Preparing test run" | ||
${KUBECTL} cluster-info --context kind-kind | ||
${KUBECTL} version | ||
${KUBECTL} get nodes | ||
|
||
for i in "${HELM_VERSIONS[@]}" | ||
do | ||
if [ "$i" != "$1" ]; then | ||
log "========================================================================" | ||
log "Testing Stratos with Helm version $i on Kubernetes ${KUBE}" | ||
./helm_$i init | ||
./helm_$i version --client | ||
|
||
HELM_MAJOR="${i:0:1}" | ||
echo ${HELM_MAJOR} | ||
|
||
# V2 and V3 are different | ||
if [ "${HELM_MAJOR}" == "3" ]; then | ||
./helm_$i install stratos "${STRATOS}/deploy/kubernetes/helm-chart" --namespace stratos --dry-run | ||
else | ||
./helm_$i init --upgrade --force-upgrade | ||
wait_for_pods "kube-system" | ||
# Don't actually install, just check we can render the chart | ||
./helm_$i install "${STRATOS}/deploy/kubernetes/helm-chart" --name stratos --namespace stratos --dry-run | ||
fi | ||
log "Done Stratos with Helm version $i on Kubernetes ${KUBE}" | ||
log "========================================================================" | ||
else | ||
log "Skipping testing with Helm version $i due to compatibility issues" | ||
fi | ||
done | ||
|
||
} | ||
|
||
# We always using --dry-run so we don't actually install - we are checking rendering only | ||
|
||
# Temp folder | ||
|
||
# Just check that there was not a kind cluster from an errored run | ||
|
||
cleanup | ||
|
||
getKind | ||
|
||
# Get Helm client for each version | ||
for i in "${HELM_VERSIONS[@]}" | ||
do | ||
getHelm "$i" | ||
done | ||
|
||
getKubectl 1.16.3 1.16 | ||
getKubectl 1.15.6 1.15 | ||
getKubectl 1.14.6 1.14 | ||
|
||
# Kind image references for a few K8S versions that we care about | ||
K8S_16_IMAGE=kindest/node:v1.16.3 | ||
K8S_15_IMAGE=kindest/node:v1.15.6 | ||
K8S_14_IMAGE=kindest/node:v1.14.6 | ||
|
||
# At this point we have the kind and helm tools | ||
|
||
# Set up a kind kube 1.14 cluster | ||
|
||
log "Kubernetes 1.14 Cluster ..." | ||
KUBE=1.14 | ||
./kind create cluster --image ${K8S_14_IMAGE} | ||
KUBECTL=./kubectl_1.14 | ||
do_chart_tests | ||
./kind delete cluster | ||
|
||
log "Kubernetes 1.15 Cluster ..." | ||
KUBE=1.15 | ||
./kind create cluster --image ${K8S_15_IMAGE} | ||
KUBECTL=./kubectl_1.15 | ||
do_chart_tests | ||
./kind delete cluster | ||
|
||
log "Kubernetes 1.16 Cluster ..." | ||
KUBE=1.16 | ||
./kind create cluster --image ${K8S_16_IMAGE} | ||
KUBECTL=./kubectl_1.16 | ||
|
||
# Helm 2.14.3 won't work with Kubernetes 1.16 | ||
do_chart_tests "2.14.3" | ||
./kind delete cluster | ||
|
||
log "All checks completed" | ||
|
||
popd > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
deploy/stratos-ui-release/jobs/backend/templates/config.properties.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.