2019-03-18 22:44:08 +07:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: code-server
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: code-server
|
|
|
|
namespace: code-server
|
|
|
|
spec:
|
|
|
|
ports:
|
2019-08-08 23:21:45 +07:00
|
|
|
- port: 8080
|
2019-03-18 22:44:08 +07:00
|
|
|
name: https
|
|
|
|
protocol: TCP
|
|
|
|
selector:
|
|
|
|
app: code-server
|
|
|
|
type: ClusterIP
|
|
|
|
---
|
|
|
|
kind: StorageClass
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: gp2
|
|
|
|
annotations:
|
|
|
|
storageclass.kubernetes.io/is-default-class: "true"
|
|
|
|
provisioner: kubernetes.io/aws-ebs
|
|
|
|
parameters:
|
|
|
|
type: gp2
|
2019-05-02 22:24:12 +07:00
|
|
|
fsType: ext4
|
2019-03-18 22:44:08 +07:00
|
|
|
---
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: code-store
|
|
|
|
namespace: code-server
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 60Gi
|
|
|
|
---
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
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:
|
|
|
|
containers:
|
2019-09-30 22:30:33 +07:00
|
|
|
- image: codercom/code-server:v2
|
2019-03-18 22:44:08 +07:00
|
|
|
imagePullPolicy: Always
|
|
|
|
name: code-servery
|
|
|
|
ports:
|
2019-08-08 23:21:45 +07:00
|
|
|
- containerPort: 8080
|
2019-03-18 22:44:08 +07:00
|
|
|
name: https
|
|
|
|
volumeMounts:
|
|
|
|
- name: code-server-storage
|
|
|
|
mountPath: /go/src
|
|
|
|
volumes:
|
|
|
|
- name: code-server-storage
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: code-store
|