Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ttlSecondsAfterFinished to setup and cleanup jobs #3656

Merged
merged 3 commits into from
Apr 17, 2024
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
1 change: 1 addition & 0 deletions .changelog/3656.changed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat: add ttlSecondsAfterFinished to setup and cleanup jobs
1 change: 1 addition & 0 deletions deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `sumologic.setup.debug` | Enable debug mode (disables the automatic execution of the setup.sh script) | `Nil` |
| `sumologic.setup.force` | Force collection installation (disables k8s version verification) | `Nil` |
| `sumologic.setup.job.resources` | Resource requests and limits for the setup Job. | `{"limits": {"memory": "256Mi", "cpu": "2000m"}, "requests": {"memory": "64Mi", "cpu": "200m"}}` |
| `sumologic.setup.job.ttlSecondsAfterFinished` | Time in seconds after which the job result will be removed from the Kubernetes cluster. | `120` |
| `sumologic.setup.monitors.enabled` | If enabled, a pre-install hook will create k8s monitors in Sumo Logic. | `true` |
| `sumologic.setup.monitors.monitorStatus` | The installed monitors default status: enabled/disabled. | `enabled` |
| `sumologic.setup.monitors.notificationEmails` | A list of emails to send notifications from monitors. | `[]` |
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/sumologic/templates/cleanup/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
app: {{ template "sumologic.metadata.name.cleanup" . }}
{{- include "sumologic.labels.common" . | nindent 4 }}
spec:
ttlSecondsAfterFinished: {{ .Values.sumologic.setup.job.ttlSecondsAfterFinished }}
template:
metadata:
annotations:
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/sumologic/templates/setup/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
app: {{ template "sumologic.labels.app.setup.job" . }}
{{- include "sumologic.labels.common" . | nindent 4 }}
spec:
ttlSecondsAfterFinished: {{ .Values.sumologic.setup.job.ttlSecondsAfterFinished }}
template:
metadata:
annotations:
Expand Down
3 changes: 3 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ sumologic:
## Add custom annotations only to setup job pod
podAnnotations: {}

## Time in seconds after which the job result will be removed from the Kubernetes cluster
ttlSecondsAfterFinished: 120

## uncomment for the debug mode (disables the automatic run of the setup.sh script)
# debug: true

Expand Down
1 change: 1 addition & 0 deletions tests/helm/testdata/goldenfile/cleanup/basic.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
release: "RELEASE-NAME"
heritage: "Helm"
spec:
ttlSecondsAfterFinished: 120
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
release: "RELEASE-NAME"
heritage: "Helm"
spec:
ttlSecondsAfterFinished: 120
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
release: "RELEASE-NAME"
heritage: "Helm"
spec:
ttlSecondsAfterFinished: 120
template:
metadata:
annotations:
Expand Down
1 change: 1 addition & 0 deletions tests/helm/testdata/goldenfile/setup/basic.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
release: "RELEASE-NAME"
heritage: "Helm"
spec:
ttlSecondsAfterFinished: 120
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
release: "RELEASE-NAME"
heritage: "Helm"
spec:
ttlSecondsAfterFinished: 120
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
release: "RELEASE-NAME"
heritage: "Helm"
spec:
ttlSecondsAfterFinished: 120
template:
metadata:
annotations:
Expand Down
Loading