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

60 lines
1.4 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:1.36@sha256:9ae97d36d26566ff84e8893c64a6dc4fe8ca6d1144bf5b87b2b85a32def253c7
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:4.89.1-ubuntu@sha256:d7faf97bc59933b398d5df5c5aec786637a9e40ae8c842bb8d23ca20e0946739
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