Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 6s
72 lines
1.9 KiB
YAML
72 lines
1.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: shadowsocks
|
|
annotations:
|
|
reloader.stakater.com/auto: "true"
|
|
labels:
|
|
app: shadowsocks
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: shadowsocks
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: shadowsocks
|
|
spec:
|
|
nodeSelector:
|
|
kubernetes.io/hostname: spb
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 65534
|
|
runAsGroup: 65534
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: shadowsocks
|
|
# shadowsocks-rust v1.25.0; multi-arch image includes linux/arm64.
|
|
image: ghcr.io/shadowsocks/ssserver-rust:v1.25.0@sha256:22240c07d8ce3a36421ede770bd775dcc5fc56d5d829943196957b05452dc36f
|
|
imagePullPolicy: IfNotPresent
|
|
command: ["/usr/bin/ssserver"]
|
|
args:
|
|
- --log-without-time
|
|
- -c
|
|
- /etc/shadowsocks-rust/config.json
|
|
ports:
|
|
- name: proxy-tcp
|
|
containerPort: 8388
|
|
hostPort: 8388
|
|
protocol: TCP
|
|
- name: proxy-udp
|
|
containerPort: 8388
|
|
hostPort: 8388
|
|
protocol: UDP
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: proxy-tcp
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 32Mi
|
|
limits:
|
|
memory: 256Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/shadowsocks-rust
|
|
readOnly: true
|
|
volumes:
|
|
- name: config
|
|
secret:
|
|
secretName: shadowsocks-config
|
|
defaultMode: 0444
|