Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased
* Added serviceMonitor.trustCRDsExist for render based deployments
* Add `migrations.ttlSecondsAfterFinished` option to chart
[#1174](https://github.com/Kong/charts/pull/1174)

### Changes

Expand Down
1 change: 1 addition & 0 deletions charts/kong/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ directory.
| migrations.preUpgrade | Run "kong migrations up" jobs | `true` |
| migrations.postUpgrade | Run "kong migrations finish" jobs | `true` |
| migrations.annotations | Annotations for migration job pods | `{"sidecar.istio.io/inject": "false" |
| migrations.ttlSecondsAfterFinished | Automatically deletes completed pods after a specified time to clean up resources | |
| migrations.jobAnnotations | Additional annotations for migration jobs | `{}` |
| migrations.backoffLimit | Override the system backoffLimit | `{}` |
| waitImage.enabled | Spawn init containers that wait for the database before starting Kong | `true` |
Expand Down
3 changes: 3 additions & 0 deletions charts/kong/templates/migrations-post-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ metadata:
{{- end }}
spec:
backoffLimit: {{ .Values.migrations.backoffLimit }}
{{- if .Values.migrations.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.migrations.ttlSecondsAfterFinished }}
{{- end }}
template:
metadata:
name: {{ template "kong.name" . }}-post-upgrade-migrations
Expand Down
3 changes: 3 additions & 0 deletions charts/kong/templates/migrations-pre-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ metadata:
{{- end }}
spec:
backoffLimit: {{ .Values.migrations.backoffLimit }}
{{- if .Values.migrations.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.migrations.ttlSecondsAfterFinished }}
{{- end }}
template:
metadata:
name: {{ template "kong.name" . }}-pre-upgrade-migrations
Expand Down
3 changes: 3 additions & 0 deletions charts/kong/templates/migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
{{- end }}
spec:
backoffLimit: {{ .Values.migrations.backoffLimit }}
{{- if .Values.migrations.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ .Values.migrations.ttlSecondsAfterFinished }}
{{- end }}
template:
metadata:
name: {{ template "kong.name" . }}-init-migrations
Expand Down
2 changes: 2 additions & 0 deletions charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ migrations:
jobAnnotations: {}
# Optionally set a backoffLimit. If none is set, Jobs will use the cluster default
backoffLimit:
# Optionally set to specify the time-to-live (TTL) for a pod after it has completed its execution before automatic deletion. If left unset, pod lifetime is indefinite.
ttlSecondsAfterFinished:
resources: {}
# Example reasonable setting for "resources":
# resources:
Expand Down