Skip to content

Commit 19fb170

Browse files
[gitpod-k3s] Allow to configure helm image
Useful for air gap installations. /werft with-installer
1 parent 44ad77a commit 19fb170

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

install/docker/gitpod-image/entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ mount --make-rshared /
1111
BASEDOMAIN=${BASEDOMAIN:-} # Used as Gitpod domain, `gitpod.` prefix will be added.
1212
DOMAIN=${DOMAIN:-} # Used as Gitpod ddomain as is.
1313
REMOVE_NETWORKPOLICIES=${REMOVE_NETWORKPOLICIES:-} # Remove Gitpod network policies when set to 'true'.
14+
HELMIMAGE=${HELMIMAGE:-alpine/helm:3.2.4} # Image that is used for the helm install.
1415

1516

1617
mkdir -p /values
@@ -138,6 +139,7 @@ sed 's/^/ /' /values.yaml >> "$GITPOD_HELM_INSTALLER_FILE"
138139

139140
sed -i "s/\$DOMAIN/$DOMAIN/g" "$GITPOD_HELM_INSTALLER_FILE"
140141
sed -i "s/\$BASEDOMAIN/$BASEDOMAIN/g" "$GITPOD_HELM_INSTALLER_FILE"
142+
sed -i "s+\$HELMIMAGE+$HELMIMAGE+g" "$GITPOD_HELM_INSTALLER_FILE"
141143

142144

143145

@@ -191,9 +193,9 @@ installation_completed_hook() {
191193
while [ -z "$(kubectl get pods | grep gitpod-helm-installer | grep Completed)" ]; do sleep 10; done
192194

193195
echo "Removing installer manifest ..."
194-
rm -f /var/lib/rancher/k3s/server/manifests/gitpod-helm-installer.yaml
196+
rm -f "$1"
195197
}
196-
installation_completed_hook &
198+
installation_completed_hook "$GITPOD_HELM_INSTALLER_FILE" &
197199

198200

199201
if [ "$REMOVE_NETWORKPOLICIES" = "true" ]; then

install/docker/gitpod-image/gitpod-helm-installer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
spec:
99
containers:
1010
- name: gitpod-helm-installer
11-
image: alpine/helm:3.2.4
11+
image: $HELMIMAGE
1212
volumeMounts:
1313
- name: kubeconfig
1414
mountPath: /root/.kube/config

0 commit comments

Comments
 (0)