gf-k8s/apps/services/sshct.yaml
2021-10-29 16:25:13 +07:00

94 lines
2 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sshct
labels:
app: sshct
spec:
replicas: 1
selector:
matchLabels:
app: sshct
template:
metadata:
labels:
app: sshct
spec:
hostname: sshct
volumes:
- name: home
hostPath:
path: /home
type: DirectoryOrCreate
- name: dockersock
hostPath:
path: /var/run/docker.sock
type: Socket
- name: host-perf
hostPath:
path: /usr/bin/perf
type: File
- name: host-perf-5.10
hostPath:
path: /usr/bin/perf_5.10
type: File
- name: host-lib-modules
hostPath:
path: /lib/modules
type: Directory
- name: host-kernel-debug
hostPath:
path: /sys/kernel/debug
type: Directory
#- name: gorilychrume
# hostPath:
# path: /data/gorilych.ru/me
# type:
containers:
- name: sshct
image: gorilych/sshct:v3.5.0
imagePullPolicy: IfNotPresent
env:
- name: CTUSERPWD
valueFrom:
secretKeyRef:
name: sshct
key: password
ports:
- containerPort: 22
name: ssh
volumeMounts:
- mountPath: /home
name: home
- mountPath: /var/run/docker.sock
name: dockersock
- mountPath: /usr/bin/perf
name: host-perf
readOnly: true
- mountPath: /usr/bin/perf_5.10
name: host-perf-5.10
readOnly: true
- mountPath: /lib/modules
name: host-lib-modules
readOnly: true
- mountPath: /sys/kernel/debug
name: host-kernel-debug
#- mountPath: /home/www/me
# name: gorilychrume
---
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