Files
hrbox-helm-chart/.helm/templates/99-update-cluster-job.yaml
2026-09-05 19:07:31 +06:00

31 lines
1.0 KiB
YAML

---
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "hrbox.component" (dict "ctx" . "name" "update-cluster") }}-{{ .Release.Revision }}
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "jobs") | nindent 4 }}
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
"helm.sh/hook-weight": "20"
spec:
ttlSecondsAfterFinished: 3600
backoffLimit: 6
template:
metadata:
labels:
{{- include "hrbox.labels" (dict "ctx" . "name" "jobs") | nindent 8 }}
spec:
restartPolicy: OnFailure
terminationGracePeriodSeconds: 5
{{- include "hrbox.imagePullSecrets" . | nindent 6 }}
containers:
- name: run-update
image: {{ .Values.image.hrbox | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["php", "yii", "util/update-cluster"]
env:
{{- include "envs_all" . | indent 12 }}
{{- include "hrbox.resources" (dict "ctx" . "component" "jobs") | indent 10 }}