Archived
72 lines
2.0 KiB
YAML
72 lines
2.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: visual-studio-code
|
|
spec:
|
|
selector:
|
|
matchLabels: {app: visual-studio-code}
|
|
template:
|
|
metadata:
|
|
labels: {app: visual-studio-code}
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
containers:
|
|
- name: visual-studio-code
|
|
image: {{ printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) | quote }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
args: {{- toYaml .Values.args | nindent 8 }}
|
|
ports: [{name: http, containerPort: 8080}]
|
|
startupProbe:
|
|
httpGet: {path: /healthz, port: http}
|
|
failureThreshold: 30
|
|
periodSeconds: 2
|
|
readinessProbe:
|
|
httpGet: {path: /healthz, port: http}
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet: {path: /healthz, port: http}
|
|
periodSeconds: 30
|
|
resources: {{- toYaml .Values.resources | nindent 10 }}
|
|
{{- with .Values.persistence.mounts }}
|
|
volumeMounts:
|
|
{{- range . }}
|
|
- name: {{ .name }}
|
|
mountPath: {{ .mountPath }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.persistence.mounts }}
|
|
volumes:
|
|
{{- range . }}
|
|
- name: {{ .name }}
|
|
persistentVolumeClaim: {claimName: "{{ .claimName }}"}
|
|
{{- end }}
|
|
{{- end }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: visual-studio-code
|
|
spec:
|
|
ports: [{name: http, port: 80, protocol: TCP, targetPort: http}]
|
|
selector: {app: visual-studio-code}
|
|
{{- if .Values.ingress.enabled }}
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: visual-studio-code
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations: {{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
rules:
|
|
- host: {{ .Values.ingress.host }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service: {name: visual-studio-code, port: {name: http}}
|
|
{{- end }}
|