2024-01-04 20:58:23 +00:00
|
|
|
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
|
2024-01-04 21:01:24 +00:00
|
|
|
image: busybox:1.36
|
2024-01-04 20:58:23 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- -c
|
|
|
|
- |
|
|
|
|
chown -R 1000:1000 /home/coder
|
|
|
|
securityContext:
|
|
|
|
runAsUser: 0
|
|
|
|
volumeMounts:
|
|
|
|
- name: data
|
|
|
|
mountPath: /home/coder
|
|
|
|
containers:
|
2024-01-04 21:01:24 +00:00
|
|
|
- image: codercom/code-server:4.20.0
|
2024-01-04 20:58:23 +00:00
|
|
|
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
|