garm-helm/charts/garm/templates/deployment.yaml

65 lines
No EOL
1.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "garm.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "garm.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "garm.selectorLabels" . | nindent 6 }}
strategy:
type: Recreate
template:
metadata:
labels:
{{- include "garm.selectorLabels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.garm.apiserver.port }}
protocol: TCP
volumeMounts:
- name: garm-config
mountPath: /etc/garm
readOnly: true
- name: edge-connect-creds
mountPath: /etc/garm-creds
readOnly: true
- name: garm-data
mountPath: /garm
readOnly: false
resources:
{{- toYaml .Values.resources | nindent 12 }}
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 1
periodSeconds: 5
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 1
periodSeconds: 5
volumes:
- name: garm-config
secret:
secretName: {{ include "garm.fullname" . }}-config
- name: edge-connect-creds
secret:
{{- if .Values.credentials.edgeConnect.existingSecretName }}
secretName: {{ .Values.credentials.edgeConnect.existingSecretName | quote }}
{{- else }}
secretName: {{ include "garm.fullname" . }}-edge-connect-creds
{{- end }}
- name: garm-data
persistentVolumeClaim:
claimName: {{ include "garm.fullname" . }}