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

add opt-out ttlSecondsAfterFinished setting for the pre-delete hook #3442

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions install/helm/agones/templates/hooks/pre_delete_hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ metadata:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": before-hook-creation
spec:
{{- if gt (int .Values.agones.crds.cleanupJobTTL) 0 }}
ttlSecondsAfterFinished: {{ .Values.agones.crds.cleanupJobTTL }}
{{- end}}
template:
metadata:
name: "{{.Release.Name}}-delete-agones-resources"
Expand Down
1 change: 1 addition & 0 deletions install/helm/agones/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ agones:
crds:
install: true
cleanupOnDelete: true
cleanupJobTTL: 60
serviceaccount:
allocator:
name: agones-allocator
Expand Down
1 change: 1 addition & 0 deletions site/content/en/docs/Installation/Install Agones/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ The following tables lists the configurable parameters of the Agones chart and t
|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| `agones.crds.install` | Install the CRDs with this chart. Useful to disable if you want to subchart (since crd-install hook is broken), so you can copy the CRDs into your own chart. | `true` |
| `agones.crds.cleanupOnDelete` | Run the pre-delete hook to delete all GameServers and their backing Pods when deleting the helm chart, so that all CRDs can be removed on chart deletion | `true` |
| `agones.crds.cleanupJobTTL` | The number of seconds for Kubernetes to delete the associated Job and Pods of the pre-delete hook after it completes, regardless if the Job is successful or not. Set to `0` to disable cleaning up the Job or the associated Pods. | `60` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - quick thing, can you make a copy of the table add feature codes around the new and old version?

See: https://agones.dev/site/docs/contribute/#within-a-page

We publish the docs on merge with main, so we have a way to keep old features hidden until they are ready in the next release.

Lemme know if you have any questions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I implemented this properly; let me know if I missed something!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Will see the preview when the build finishes! 👍🏻


### Metrics

Expand Down