mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 01:49:44 +00:00
sshct: use hostNetwork and privileged
This commit is contained in:
parent
b13d2ecb02
commit
8f27c379bb
1 changed files with 6 additions and 21 deletions
|
|
@ -15,7 +15,7 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: sshct
|
app: sshct
|
||||||
spec:
|
spec:
|
||||||
hostname: sshct
|
hostNetwork: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: home
|
- name: home
|
||||||
hostPath:
|
hostPath:
|
||||||
|
|
@ -27,35 +27,20 @@ spec:
|
||||||
type: Socket
|
type: Socket
|
||||||
containers:
|
containers:
|
||||||
- name: sshct
|
- name: sshct
|
||||||
image: ghcr.io/amkartashov/sshct:v3.7.1
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
image: ghcr.io/amkartashov/sshct:v3.8.0
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
|
- name: CT_SSH_PORT
|
||||||
|
value: "30810"
|
||||||
- name: CTUSERPWD
|
- name: CTUSERPWD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: sshct
|
name: sshct
|
||||||
key: password
|
key: password
|
||||||
ports:
|
|
||||||
- containerPort: 22
|
|
||||||
name: ssh
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /home
|
- mountPath: /home
|
||||||
name: home
|
name: home
|
||||||
- mountPath: /var/run/docker.sock
|
- mountPath: /var/run/docker.sock
|
||||||
name: dockersock
|
name: dockersock
|
||||||
---
|
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: sshct
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: sshct
|
|
||||||
externalTrafficPolicy: Local
|
|
||||||
ports:
|
|
||||||
- name: ssh
|
|
||||||
protocol: TCP
|
|
||||||
port: 22
|
|
||||||
targetPort: ssh
|
|
||||||
nodePort: 30810
|
|
||||||
type: NodePort
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue