Files
coder/helm/templates/coder.yaml
T
Eric Paulsen fba03aea6e helm: add imagePullSecret for air-gapped cust's (#4700)
* helm: add imagePullSecret for air-gapped cust's

* helm: pullSecrets array

* fix: tag

* indentation

Co-authored-by: Dean Sheather <dean@deansheather.com>

* array

Co-authored-by: Dean Sheather <dean@deansheather.com>

Co-authored-by: Dean Sheather <dean@deansheather.com>
2022-10-24 13:24:21 -04:00

73 lines
2.4 KiB
YAML

{{- include "coder.verifyDeprecated" . -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: coder
annotations: {{ toYaml .Values.coder.serviceAccount.annotations | nindent 4 }}
labels:
{{- include "coder.labels" . | nindent 4 }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: coder
labels:
{{- include "coder.labels" . | nindent 4 }}
annotations: {{ toYaml .Values.coder.annotations | nindent 4}}
spec:
replicas: {{ .Values.coder.replicaCount }}
selector:
matchLabels:
{{- include "coder.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "coder.selectorLabels" . | nindent 8 }}
spec:
serviceAccountName: coder
restartPolicy: Always
{{- with .Values.coder.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 60
containers:
- name: coder
image: {{ include "coder.image" . | quote }}
imagePullPolicy: {{ .Values.coder.image.pullPolicy }}
resources:
{{- toYaml .Values.coder.resources | nindent 12 }}
env:
- name: CODER_ADDRESS
value: "0.0.0.0:{{ include "coder.port" . }}"
# Used for inter-pod communication with high-availability.
- name: KUBE_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: CODER_DERP_SERVER_RELAY_URL
value: "{{ include "coder.portName" . }}://$(KUBE_POD_IP):{{ include "coder.port" . }}"
{{- include "coder.tlsEnv" . | nindent 12 }}
{{- with .Values.coder.env -}}
{{ toYaml . | nindent 12 }}
{{- end }}
ports:
- name: {{ include "coder.portName" . | quote }}
containerPort: {{ include "coder.port" . }}
protocol: TCP
readinessProbe:
httpGet:
path: /api/v2/buildinfo
port: {{ include "coder.portName" . | quote }}
scheme: {{ include "coder.scheme" . | quote }}
livenessProbe:
httpGet:
path: /api/v2/buildinfo
port: {{ include "coder.portName" . | quote }}
scheme: {{ include "coder.scheme" . | quote }}
{{- include "coder.volumeMounts" . | nindent 10 }}
{{- include "coder.volumes" . | nindent 6 }}