apiVersion: apps/v1
kind: Deployment
metadata:
  name: ssh-inlet-tunnel
  namespace: ssh-inlet-tunnel
spec:
  replicas: 1
  selector:
    matchLabels:
      deployment: my-ssh-inlet-tunnel
  template:
    metadata:
      labels:
        deployment: my-ssh-inlet-tunnel
    spec:
      containers:
        - imagePullPolicy: Always
          name: ssh-inlet-tunnel
          envFrom:
            - prefix: ''
              configMapRef:
                name: ssh-inlet-tunnel
                optional: false
          volumeMounts:
            - name: vol0
              mountPath: /root/.ssh/
          image: minidocks/openssh
          command:
            - /usr/bin/ssh
          tty: false
          args:
            - '-oStrictHostKeyChecking=no'
            - '-oExitOnForwardFailure=yes'
            - '-oServerAliveInterval=30'
            - '-R80:192.168.0.240:80'
            - '-R443:192.168.0.240:443'
            - '-N'
            - root@$(ENDPOINT)
      restartPolicy: Always
      volumes:
        - secret:
            secretName: ssh-inlet-tunnel
            defaultMode: 384
          name: vol0
