All checks were successful
Build and Publish TechDocs (Helm Chart Resource) / build-and-publish-helm-chart (push) Successful in 1m12s
Change-Id: I8c7efecb9159f9025c139ba383cf1a5ae84ed88f
97 lines
3.2 KiB
YAML
97 lines
3.2 KiB
YAML
{{/*
|
|
Copyright 2026 HAProxy Technologies LLC
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if .Values.gwapijob.enabled }}
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: {{ include "haproxy-unified-gateway.gwapijob.fullname" . }}
|
|
namespace: {{ include "haproxy-unified-gateway.namespace" . }}
|
|
labels:
|
|
{{- include "haproxy-unified-gateway.gwapijobLabels" . | nindent 4 }}
|
|
annotations:
|
|
"helm.sh/hook": post-install,pre-upgrade
|
|
"helm.sh/hook-weight": "0"
|
|
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
|
"argocd.argoproj.io/hook": PostSync
|
|
{{- with .Values.gwapijob.podAnnotations }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.gwapijob.ttlSecondsAfterFinished }}
|
|
ttlSecondsAfterFinished: {{ . }}
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "haproxy-unified-gateway.gwapijobLabels" . | nindent 8 }}
|
|
{{- with .Values.gwapijob.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
serviceAccountName: {{ include "haproxy-unified-gateway.crdjob.saName" . }}
|
|
restartPolicy: Never
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
{{- with .Values.controller.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: gwapijob
|
|
{{- if .Values.gwapijob.image.repository }}
|
|
image: {{ printf "%s:%s" .Values.gwapijob.image.repository (default .Chart.AppVersion .Values.gwapijob.image.tag) }}
|
|
{{- else }}
|
|
image: {{ include "haproxy-unified-gateway.image" . }}
|
|
{{- end }}
|
|
imagePullPolicy: {{ .Values.controller.image.pullPolicy }}
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
command:
|
|
- /usr/local/sbin/hug
|
|
- --job-gwapi={{ .Values.gwapijob.version }}
|
|
{{- with .Values.gwapijob.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- with .Values.gwapijob.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.gwapijob.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.gwapijob.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
backoffLimit: 0
|
|
{{- end }}
|