mirror of
https://github.com/coder/coder.git
synced 2025-07-30 22:19:53 +00:00
feat: add external provisioner daemon helm chart (#8939)
* Refactor helm to extract common templates to libcoder Signed-off-by: Spike Curtis <spike@coder.com> * Remove comment from libcoder Chart.yaml Signed-off-by: Spike Curtis <spike@coder.com> * Add provisioner helm chart * Fix prettier, linting, docs Signed-off-by: Spike Curtis <spike@coder.com> * Log at INFO when provisionerd connects to coderd Signed-off-by: Spike Curtis <spike@coder.com> * remove unnecessary exports in helm tests Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
85
helm/libcoder/templates/_coder.yaml
Normal file
85
helm/libcoder/templates/_coder.yaml
Normal file
@@ -0,0 +1,85 @@
|
||||
{{- define "libcoder.deployment.tpl" -}}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "coder.name" .}}
|
||||
labels:
|
||||
{{- include "coder.labels" . | nindent 4 }}
|
||||
{{- with .Values.coder.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations: {{ toYaml .Values.coder.annotations | nindent 4}}
|
||||
spec:
|
||||
replicas: {{ .Values.coder.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "coder.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "coder.labels" . | nindent 8 }}
|
||||
{{- with .Values.coder.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- toYaml .Values.coder.podAnnotations | nindent 8 }}
|
||||
spec:
|
||||
serviceAccountName: {{ .Values.coder.serviceAccount.name | quote }}
|
||||
restartPolicy: Always
|
||||
{{- with .Values.coder.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: 60
|
||||
{{- with .Values.coder.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.coder.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.coder.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.coder.initContainers }}
|
||||
initContainers:
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers: []
|
||||
{{- include "coder.volumes" . | nindent 6 }}
|
||||
{{- end -}}
|
||||
{{- define "libcoder.deployment" -}}
|
||||
{{- include "libcoder.util.merge" (append . "libcoder.deployment.tpl") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "libcoder.containerspec.tpl" -}}
|
||||
name: coder
|
||||
image: {{ include "coder.image" . | quote }}
|
||||
imagePullPolicy: {{ .Values.coder.image.pullPolicy }}
|
||||
command:
|
||||
{{- toYaml .Values.coder.command | nindent 2 }}
|
||||
resources:
|
||||
{{- toYaml .Values.coder.resources | nindent 2 }}
|
||||
lifecycle:
|
||||
{{- toYaml .Values.coder.lifecycle | nindent 2 }}
|
||||
securityContext: {{ toYaml .Values.coder.securityContext | nindent 2 }}
|
||||
{{ include "coder.volumeMounts" . }}
|
||||
{{- end -}}
|
||||
{{- define "libcoder.containerspec" -}}
|
||||
{{- include "libcoder.util.merge" (append . "libcoder.containerspec.tpl") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "libcoder.serviceaccount.tpl" -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.coder.serviceAccount.name | quote }}
|
||||
annotations: {{ toYaml .Values.coder.serviceAccount.annotations | nindent 4 }}
|
||||
labels:
|
||||
{{- include "coder.labels" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
{{- define "libcoder.serviceaccount" -}}
|
||||
{{- include "libcoder.util.merge" (append . "libcoder.serviceaccount.tpl") -}}
|
||||
{{- end -}}
|
Reference in New Issue
Block a user