Skip to content

Commit 38013af

Browse files
authored
MINOR: kubernetes-ingress: add activeDeadlineSeconds to crdjob configuration (#381)
Add an optional crdjob.activeDeadlineSeconds value that sets the matching field on the CRD installation Job, bounding how long the Job may stay active before Kubernetes terminates it as DeadlineExceeded. The field is omitted when the value is unset, so existing installs are unaffected. Note: the chart version is intentionally left at 1.53.1, so this value will only be published with the next kubernetes-ingress release bump. Signed-off-by: Dinko Korunic <dkorunic@haproxy.com>
1 parent d17229e commit 38013af

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

kubernetes-ingress/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ A Helm `post-install` / `pre-upgrade` hook Job that applies the controller's CRD
509509
|---|---|---|
510510
| `crdjob.podAnnotations` | Annotations on the Job pod. | `{}` |
511511
| `crdjob.ttlSecondsAfterFinished` | Seconds after which the Job is garbage-collected. | `600` |
512+
| `crdjob.activeDeadlineSeconds` | Seconds the Job may stay active before Kubernetes terminates it and marks it `DeadlineExceeded`. Omitted when unset, so the Job runs without a deadline. | _unset_ |
512513
| `crdjob.nodeSelector` / `.tolerations` / `.affinity` | Scheduling controls for the Job pod. | `{}` / `[]` / `{}` |
513514
| `crdjob.resources.requests` / `.limits` | CPU/memory requests and (optional) limits for the Job container. | `cpu: 250m`, `memory: 400Mi` (no limits) |
514515

kubernetes-ingress/templates/controller-crdjob.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ metadata:
3232
spec:
3333
{{- if .Values.crdjob.ttlSecondsAfterFinished }}
3434
ttlSecondsAfterFinished: {{ .Values.crdjob.ttlSecondsAfterFinished }}
35+
{{- end }}
36+
{{- if .Values.crdjob.activeDeadlineSeconds }}
37+
activeDeadlineSeconds: {{ .Values.crdjob.activeDeadlineSeconds }}
3538
{{- end }}
3639
backoffLimit: 0
3740
template:

kubernetes-ingress/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,10 @@ crdjob:
710710
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/
711711
ttlSecondsAfterFinished: 600
712712

713+
## Duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it
714+
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-termination-and-cleanup
715+
activeDeadlineSeconds:
716+
713717
## Pod Node assignment
714718
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
715719
nodeSelector: {}

0 commit comments

Comments
 (0)