ssh tunnel to kindev
All checks were successful
Build and Deploy Staging / build (push) Successful in 49s
Build and Deploy Staging / deploy (push) Successful in 7s

This commit is contained in:
Tobias Brunner 2025-03-24 15:06:42 +01:00
parent 239a57a033
commit 60d62bd0af
No known key found for this signature in database

View file

@ -12,3 +12,29 @@ spec:
value: staging
- name: SERVALA_ALLOWED_HOSTS
value: staging.portal.servala.com
- name: ssh-tunnel
image: servala-2nkgm.app.codey.ch/servala/servala-portal:latest
command:
- "/bin/bash"
- "-c"
- |
mkdir -p /app/.ssh && chmod 700 /app/.ssh
echo "$SSH_PRIVATE_KEY" > /app/.ssh/id
chmod 600 /app/.ssh/id
ssh $SSH_HOST -l $SSH_USER -o StrictHostKeyChecking=no -L 8443:127.0.0.1:8443 -N -i /app/.ssh/id -v
env:
- name: SSH_HOST
valueFrom:
secretKeyRef:
name: servala-sshclient
key: ssh-host
- name: SSH_USER
valueFrom:
secretKeyRef:
name: servala-sshclient
key: ssh-user
- name: SSH_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: servala-sshclient
key: ssh-private-key