k3s-configs/apps/code-server/deployment.yaml

60 lines
1.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: code-server
name: code-server
namespace: code-server
spec:
selector:
matchLabels:
app: code-server
replicas: 1
template:
metadata:
labels:
app: code-server
spec:
initContainers:
- name: init-chmod-data
image: busybox:latest
imagePullPolicy: IfNotPresent
command:
- sh
- -c
- |
chown -R 1000:1000 /home/coder
securityContext:
runAsUser: 0
volumeMounts:
- name: data
mountPath: /home/coder
containers:
- image: codercom/code-server:latest
imagePullPolicy: IfNotPresent
name: code-server
args:
- --auth
- none
securityContext:
runAsUser: 1000
volumeMounts:
- name: data
mountPath: /home/coder
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
volumes:
- name: data
persistentVolumeClaim:
claimName: code-server