Skip to content

Commit d489b63

Browse files
committed
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
1 parent 5dc57f2 commit d489b63

File tree

3 files changed

+42
-21
lines changed

3 files changed

+42
-21
lines changed

magnum/drivers/common/templates/kubernetes/fragments/install-helm-modules.sh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,11 @@ if [ ! -z "$NO_PROXY" ]; then
1717
export NO_PROXY
1818
fi
1919

20-
ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost"
21-
2220
echo "Waiting for Kubernetes API..."
2321
until [ "ok" = "$(kubectl get --raw='/healthz')" ]; do
2422
sleep 5
2523
done
2624

27-
if [ -z "${HELM_CLIENT_URL}" ] ; then
28-
HELM_CLIENT_URL="https://get.helm.sh/helm-$HELM_CLIENT_TAG-linux-amd64.tar.gz"
29-
fi
30-
i=0
31-
until curl -o /srv/magnum/helm-client.tar.gz "${HELM_CLIENT_URL}"; do
32-
i=$((i + 1))
33-
[ $i -lt 5 ] || break;
34-
sleep 5
35-
done
36-
37-
if ! echo "${HELM_CLIENT_SHA256} /srv/magnum/helm-client.tar.gz" | sha256sum -c - ; then
38-
echo "ERROR helm-client.tar.gz computed checksum did NOT match, exiting."
39-
exit 1
40-
fi
41-
42-
source /etc/bashrc
43-
$ssh_cmd tar xzvf /srv/magnum/helm-client.tar.gz linux-amd64/helm -O > /srv/magnum/bin/helm
44-
$ssh_cmd chmod +x /srv/magnum/bin/helm
45-
4625
helm_install_cmd="helm upgrade --install magnum . --namespace kube-system --values values.yaml --render-subchart-notes"
4726
helm_history_cmd="helm history magnum --namespace kube-system"
4827
if [[ "${HELM_CLIENT_TAG}" == v2.* ]]; then
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
step="install-helm"
2+
echo "START: ${step}"
3+
4+
set +x
5+
. /etc/sysconfig/heat-params
6+
set -ex
7+
8+
if [ ! -z "$HTTP_PROXY" ]; then
9+
export HTTP_PROXY
10+
fi
11+
12+
if [ ! -z "$HTTPS_PROXY" ]; then
13+
export HTTPS_PROXY
14+
fi
15+
16+
if [ ! -z "$NO_PROXY" ]; then
17+
export NO_PROXY
18+
fi
19+
20+
ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost"
21+
22+
if [ -z "${HELM_CLIENT_URL}" ] ; then
23+
HELM_CLIENT_URL="https://get.helm.sh/helm-$HELM_CLIENT_TAG-linux-amd64.tar.gz"
24+
fi
25+
i=0
26+
until curl -o /srv/magnum/helm-client.tar.gz "${HELM_CLIENT_URL}"; do
27+
i=$((i + 1))
28+
[ $i -lt 5 ] || break;
29+
sleep 5
30+
done
31+
32+
if ! echo "${HELM_CLIENT_SHA256} /srv/magnum/helm-client.tar.gz" | sha256sum -c - ; then
33+
echo "ERROR helm-client.tar.gz computed checksum did NOT match, exiting."
34+
exit 1
35+
fi
36+
37+
source /etc/bashrc
38+
$ssh_cmd tar xzvf /srv/magnum/helm-client.tar.gz linux-amd64/helm -O > /srv/magnum/bin/helm
39+
$ssh_cmd chmod +x /srv/magnum/bin/helm
40+
41+
echo "END: ${step}"

magnum/drivers/k8s_fedora_coreos_v1/templates/kubecluster.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,7 @@ resources:
15011501
- get_file: ../../common/templates/kubernetes/fragments/enable-auto-scaling.sh
15021502
- get_file: ../../common/templates/kubernetes/fragments/enable-cinder-csi.sh
15031503
# Helm Based Installation Configuration Scripts
1504+
- get_file: ../../common/templates/kubernetes/fragments/install-helm.sh
15041505
- get_file: ../../common/templates/kubernetes/helm/metrics-server.sh
15051506
- str_replace:
15061507
template: {get_file: ../../common/templates/kubernetes/helm/prometheus-operator.sh}

0 commit comments

Comments
 (0)