Update kubernetes-templates/vscode.yml
This commit is contained in:
@@ -5,6 +5,25 @@ metadata:
|
|||||||
name: vscode
|
name: vscode
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: vscode-admin-sa
|
||||||
|
namespace: vscode
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: vscode-admin-binding
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: vscode-admin-sa
|
||||||
|
namespace: vscode
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: vscode-data-pvc
|
name: vscode-data-pvc
|
||||||
@@ -43,6 +62,7 @@ metadata:
|
|||||||
app: vscode
|
app: vscode
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
terminationGracePeriodSeconds: 60
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: vscode
|
app: vscode
|
||||||
@@ -51,6 +71,7 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: vscode
|
app: vscode
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: vscode-admin-sa
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
@@ -67,6 +88,10 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
name: http
|
name: http
|
||||||
|
- containerPort: 3000
|
||||||
|
name: node-dev
|
||||||
|
- containerPort: 5000
|
||||||
|
name: dotnet-dev
|
||||||
env:
|
env:
|
||||||
- name: PASSWORD
|
- name: PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
@@ -78,16 +103,11 @@ spec:
|
|||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
name: vscode-config
|
name: vscode-config
|
||||||
key: CODE_SERVER_ARGS
|
key: CODE_SERVER_ARGS
|
||||||
resources:
|
- name: ASPNETCORE_URLS
|
||||||
requests:
|
value: "http://0.0.0.0:5000"
|
||||||
cpu: "250m"
|
|
||||||
memory: "512Mi"
|
|
||||||
limits:
|
|
||||||
cpu: "1000m"
|
|
||||||
memory: "1Gi"
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: vscode-storage
|
- name: vscode-storage
|
||||||
mountPath: /home/coder/project
|
mountPath: /home/coder/repos
|
||||||
volumes:
|
volumes:
|
||||||
- name: vscode-storage
|
- name: vscode-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
@@ -128,4 +148,4 @@ spec:
|
|||||||
protocol: TCP
|
protocol: TCP
|
||||||
port: 5000
|
port: 5000
|
||||||
targetPort: 5000
|
targetPort: 5000
|
||||||
nodePort: 32084
|
nodePort: 32084
|
||||||
Reference in New Issue
Block a user