forked from openstack/magnum
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Helm client install to separate script
To deploy Calico with Tigera Operator helm charts it was necessary to move Helm client install to separate script for earlier execution. Change-Id: Iab738b4120c0ac823b247b04f0cd750de0147779 (cherry picked from commit b6e2aa8)
- Loading branch information
Showing
3 changed files
with
42 additions
and
21 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
41 changes: 41 additions & 0 deletions
41
magnum/drivers/common/templates/kubernetes/fragments/install-helm.sh
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,41 @@ | ||
step="install-helm" | ||
echo "START: ${step}" | ||
|
||
set +x | ||
. /etc/sysconfig/heat-params | ||
set -ex | ||
|
||
if [ ! -z "$HTTP_PROXY" ]; then | ||
export HTTP_PROXY | ||
fi | ||
|
||
if [ ! -z "$HTTPS_PROXY" ]; then | ||
export HTTPS_PROXY | ||
fi | ||
|
||
if [ ! -z "$NO_PROXY" ]; then | ||
export NO_PROXY | ||
fi | ||
|
||
ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost" | ||
|
||
if [ -z "${HELM_CLIENT_URL}" ] ; then | ||
HELM_CLIENT_URL="https://get.helm.sh/helm-$HELM_CLIENT_TAG-linux-amd64.tar.gz" | ||
fi | ||
i=0 | ||
until curl -o /srv/magnum/helm-client.tar.gz "${HELM_CLIENT_URL}"; do | ||
i=$((i + 1)) | ||
[ $i -lt 5 ] || break; | ||
sleep 5 | ||
done | ||
|
||
if ! echo "${HELM_CLIENT_SHA256} /srv/magnum/helm-client.tar.gz" | sha256sum -c - ; then | ||
echo "ERROR helm-client.tar.gz computed checksum did NOT match, exiting." | ||
exit 1 | ||
fi | ||
|
||
source /etc/bashrc | ||
$ssh_cmd tar xzvf /srv/magnum/helm-client.tar.gz linux-amd64/helm -O > /srv/magnum/bin/helm | ||
$ssh_cmd chmod +x /srv/magnum/bin/helm | ||
|
||
echo "END: ${step}" |
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