Skip to content

Commit 4dc5438

Browse files
Simon Emmsroboquat
Simon Emms
authored andcommitted
[kots]: add support for SSH gateway (allows JetBrains IDE et al)
Original work by @corneliusludmann
1 parent dcb1f11 commit 4dc5438

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
@@ -157,6 +157,16 @@ spec:
157157
fi
158158
fi
159159
160+
if [ '{{repl ConfigOptionEquals "ssh_gateway" "1" }}' = "true" ];
161+
then
162+
echo "Gitpod: Generate SSH host key"
163+
apk update && apk add --no-cache openssh-keygen # TODO: Move installation of openssh-keygen to installer image
164+
ssh-keygen -t rsa -q -N "" -f host.key
165+
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?"
166+
yq e -i '.sshGatewayHostKey.kind = "secret"' "${CONFIG_FILE}"
167+
yq e -i '.sshGatewayHostKey.name = "ssh-gateway-host-key"' "${CONFIG_FILE}"
168+
fi
169+
160170
echo "Gitpod: Generate the Kubernetes objects and apply"
161171
/app/installer render -c "${CONFIG_FILE}" --namespace {{repl Namespace }} | kubectl apply -f -
162172

install/kots/manifests/kots-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,12 @@ spec:
322322
required: true
323323
when: '{{repl ConfigOptionEquals "cert_manager_enabled" "0" }}'
324324
help_text: A file containing the TLS private key.
325+
326+
- name: features
327+
title: Additional features
328+
items:
329+
- name: ssh_gateway
330+
title: Allow login to your workspace via SSH
331+
type: bool
332+
default: "0"
333+
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)