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

73 lines
2.2 KiB
YAML

{{- $name := include "hrbox.component" (dict "ctx" . "name" "conductor") -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $name }}
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "conductor") | nindent 4 }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "conductor") | nindent 6 }}
template:
metadata:
labels:
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "conductor") | nindent 8 }}
app: conductor
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '8080'
prometheus.io/path: '/metrics'
checksum/app-secret: {{ include (print $.Template.BasePath "/00-app-secret.yaml") . | sha256sum }}
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- conductor
topologyKey: kubernetes.io/hostname
{{- include "hrbox.imagePullSecrets" . | nindent 6 }}
containers:
- name: conductor
image: {{ .Values.image.conductor | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
env:
{{- include "envs_all" . | indent 12 }}
{{- include "hrbox.resources" (dict "ctx" . "component" "conductor") | indent 10 }}
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- "sleep 5"