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:5eef5ed34e1e1ff0a4ae850395cbf665c4de6b4b83a32a0bc7bcb998e24e7bbb
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