File tree Expand file tree Collapse file tree 1 file changed +25
-18
lines changed
deploy/helm/ifrcgo-helm/templates Expand file tree Collapse file tree 1 file changed +25
-18
lines changed Original file line number Diff line number Diff line change @@ -11,20 +11,20 @@ data:
1111---
1212
1313apiVersion : v1
14- kind : PersistentVolumeClaim
14+ kind : ConfigMap
1515metadata :
16- name : {{ template "ifrcgo-helm.fullname" . }}-ssh-bastion -config
17- spec :
18- accessModes :
19- - ReadWriteOnce
20- resources :
21- requests :
22- storage : 100Mi
16+ name : {{ template "ifrcgo-helm.fullname" . }}-fix-sshd -config
17+ data :
18+ fix-sshd-config.sh : |
19+ #!/bin/bash
20+ # set -e
21+ sed -i 's/#AllowAgentForwarding yes/AllowAgentForwarding yes/g' /etc/ssh/sshd_config
22+ sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/g' /etc/ssh/sshd_config
2323
2424 ---
2525
2626apiVersion : apps/v1
27- kind : Deployment
27+ kind : StatefulSet
2828metadata :
2929 name : {{ template "ifrcgo-helm.fullname" . }}-ssh-bastion
3030 labels :
4444 containers :
4545 - name : ssh-bastion
4646 image : linuxserver/openssh-server:latest
47- command : ["sh", "-c"]
48- args :
49- - |
50- sed -i 's@AllowTcpForwarding no@AllowTcpForwarding yes@' /etc/ssh/sshd_config
51- touch /tmp/touched
52- /init
5347 ports :
5448 - containerPort : 2222
5549 resources :
@@ -78,13 +72,26 @@ spec:
7872 readOnly : true
7973 - name : config-volume
8074 mountPath : /config
75+ - name : fix-sshd-config
76+ mountPath : /custom-cont-init.d/fix-sshd-config.sh
77+ subPath : fix-sshd-config.sh
78+ restartPolicy : Always
8179 volumes :
8280 - name : ssh-authorized-keys
8381 configMap :
8482 name : {{ template "ifrcgo-helm.fullname" . }}-ssh-authorized-keys
85- - name : config-volume
86- persistentVolumeClaim :
87- claimName : {{ template "ifrcgo-helm.fullname" . }}-ssh-bastion-config
83+ - name : fix-sshd-config
84+ configMap :
85+ name : {{ template "ifrcgo-helm.fullname" . }}-fix-sshd-config
86+ volumeClaimTemplates :
87+ - metadata :
88+ name : config-volume
89+ spec :
90+ accessModes :
91+ - ReadWriteOnce
92+ resources :
93+ requests :
94+ storage : 100Mi
8895
8996---
9097
You can’t perform that action at this time.
0 commit comments