Skip to content

Commit 1525bad

Browse files
committed
BUG: kubernetes-ingress: Increase default and expose CRD job TTL (#266)
1 parent 2842f33 commit 1525bad

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

kubernetes-ingress/templates/controller-crdjob.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ metadata:
3030
argocd.argoproj.io/hook-delete-policy: HookSucceeded
3131
spec:
3232
{{- if or (.Capabilities.APIVersions.Has "batch/v1alpha1") (semverCompare ">=1.23.0-0" .Capabilities.KubeVersion.Version) }}
33-
ttlSecondsAfterFinished: 120
33+
{{- if .Values.crdjob.ttlSecondsAfterFinished }}
34+
ttlSecondsAfterFinished: {{ .Values.crdjob.ttlSecondsAfterFinished }}
35+
{{- end }}
3436
{{- end }}
3537
backoffLimit: 0
3638
template:

kubernetes-ingress/values.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616
## ref: https://github.com/haproxytech/kubernetes-ingress/tree/master/documentation
1717

1818
podSecurityPolicy:
19+
## Specify pod annotations
20+
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
21+
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
22+
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
1923
annotations: {}
20-
## Specify pod annotations
21-
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
22-
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp
23-
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl
24-
##
2524
# apparmor.security.beta.kubernetes.io/allowedProfileNames: runtime/default
2625
# apparmor.security.beta.kubernetes.io/defaultProfileName: runtime/default
2726
# seccomp.security.alpha.kubernetes.io/allowedProfileNames: runtime/default
@@ -598,4 +597,8 @@ crdjob:
598597
## All annotations from the controller (if set) are added to the pod metadata
599598
## If the annotation key is set for both controller and crdjob, the crdjob annotation will be used
600599
podAnnotations: {}
601-
# key: value
600+
# key: value
601+
602+
## Automatic job cleanup
603+
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/
604+
ttlSecondsAfterFinished: 600

0 commit comments

Comments
 (0)