Skip to content

Commit 1a2ec0f

Browse files
author
Simon Emms
committed
[kots]: add support for SSH gateway (allows JetBrains IDE et al)
Original work by @corneliusludmann
1 parent 5fb0cb8 commit 1a2ec0f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

install/kots/manifests/gitpod-installer-job.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ spec:
156156
fi
157157
fi
158158
159+
if [ '{{repl ConfigOptionEquals "ssh_gateway" "1" }}' = "true" ];
160+
then
161+
echo "Gitpod: Generate SSH host key"
162+
apk update && apk add --no-cache openssh-keygen # TODO: Move installation of openssh-keygen to installer image
163+
ssh-keygen -t rsa -q -N "" -f host.key
164+
kubectl create secret generic ssh-gateway-host-key --from-file=host.key -n {{repl Namespace }} || echo "SSH Gateway Host Key secret has not been created. Does it exist already?"
165+
yq e -i '.sshGatewayHostKey.kind = "secret"' "${CONFIG_FILE}"
166+
yq e -i '.sshGatewayHostKey.name = "ssh-gateway-host-key"' "${CONFIG_FILE}"
167+
fi
168+
159169
echo "Gitpod: Generate the Kubernetes objects and apply"
160170
/app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} | kubectl apply -f -
161171

install/kots/manifests/kots-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,12 @@ spec:
328328
required: true
329329
when: '{{repl ConfigOptionEquals "cert_manager_enabled" "0" }}'
330330
help_text: A file containing the TLS private key.
331+
332+
- name: features
333+
title: Additional features
334+
items:
335+
- name: ssh_gateway
336+
title: Allow login to your workspace via SSH
337+
type: bool
338+
default: "0"
339+
help_text: 'Enabling the SSH gateway allows use of additional desktop IDEs. IMPORTANT: This uses port 22 on your Kubernetes nodes. When enabled, this will prevent login to the cluster via SSH. If you wish to maintain SSH access to your cluster, please configure another SSH port on your nodes.'

0 commit comments

Comments
 (0)