07_deployment.yml 935 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. apiVersion: extensions/v1beta1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. run: ssh-bastion
  6. name: ssh-bastion
  7. namespace: openshift-ssh-bastion
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. run: ssh-bastion
  13. template:
  14. metadata:
  15. labels:
  16. run: ssh-bastion
  17. spec:
  18. serviceAccountName: "ssh-bastion"
  19. containers:
  20. - image: quay.io/eparis/ssh:latest
  21. imagePullPolicy: Always
  22. name: ssh-bastion
  23. ports:
  24. - containerPort: 22
  25. name: ssh
  26. protocol: TCP
  27. volumeMounts:
  28. - name: ssh-host-keys
  29. mountPath: "/etc/ssh/"
  30. readOnly: true
  31. volumes:
  32. - name: ssh-host-keys
  33. secret:
  34. secretName: ssh-host-keys
  35. items:
  36. - key: ssh_host_rsa_key
  37. path: ssh_host_rsa_key
  38. mode: 256
  39. - key: sshd_config
  40. path: sshd_config
  41. restartPolicy: Always