Files
hrbox-helm-chart/.helm/templates/04-worker.yaml
T
2026-09-05 19:07:31 +06:00

39 lines
1.3 KiB
YAML

{{- $name := include "hrbox.component" (dict "ctx" . "name" "worker") -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $name }}
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "worker") | nindent 4 }}
spec:
minReadySeconds: 5
strategy:
type: Recreate
replicas: {{ .Values.app.replicas.worker }}
selector:
matchLabels:
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "worker") | nindent 6 }}
template:
metadata:
labels:
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "worker") | nindent 8 }}
app: worker
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '9253'
checksum/app-secret: {{ include (print $.Template.BasePath "/00-app-secret.yaml") . | sha256sum }}
spec:
{{- include "hrbox.imagePullSecrets" . | nindent 6 }}
containers:
- name: worker
image: {{ .Values.image.hrbox | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["hrbox-worker"]
env:
{{- include "envs_all" . | indent 12 }}
- name: VIDEO_CONVERTER_ENABLED
value: {{ .Values.app.videoConverter.enabled | quote }}
{{- include "hrbox.resources" (dict "ctx" . "component" "worker") | indent 10 }}
terminationGracePeriodSeconds: 600