airshipctl/tools/deployment/35_deploy_workload.sh
Sean Eagan d64404864b Update Flux manifests
This updates the Flux manifests to the latest versions, which includes
a fix [0] to Helm chart rendering which was impacting the OSH charts.

[0]: https://github.com/fluxcd/helm-controller/pull/172

This also adds Kptfiles to each of the functions to make it trivial
to update them.

Relates-To: #430
Change-Id: Ic12bc6a8460542fd943ed3539cf1be19b6525dbc
2021-01-05 13:58:03 -06:00

37 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -xe
#Default wait timeout is 600 seconds
export TIMEOUT=${TIMEOUT:-600s}
export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}
export KUBECONFIG_TARGET_CONTEXT=${KUBECONFIG_TARGET_CONTEXT:-"target-cluster"}
export TARGET_IP=${TARGET_IP:-"10.23.25.102"}
export TARGET_PORT=${TARGET_PORT:-"30000"}
echo "Deploy workload"
airshipctl phase run workload-target --debug
echo "Ensure we can reach ingress controller default backend"
if [ "404" != "$(curl --head --write-out '%{http_code}' --silent --output /dev/null $TARGET_IP:$TARGET_PORT/should-404)" ]; then
echo -e "\nFailed to reach ingress controller default backend."
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get all -n flux-system
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT logs -n flux-system -l app=helm-controller
kubectl --kubeconfig $KUBECONFIG --context $KUBECONFIG_TARGET_CONTEXT get hr --all-namespaces -o yaml
exit 1
fi