-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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 ttlSecondsAfterFinished to migrateDatabaseJob and createUserJob #29314
Add ttlSecondsAfterFinished to migrateDatabaseJob and createUserJob #29314
Conversation
@@ -48,6 +48,9 @@ metadata: | |||
{{- $annotations | toYaml | nindent 4 }} | |||
{{- end }} | |||
spec: | |||
{{- if not (kindIs "invalid" .Values.createUserJob.ttlSecondsAfterFinished) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking specifically for not nil
because 0
is a valid value for this field and it would evaluate to false normally.
Ah, I missed that one and it's a better fix than mine #29439 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is better than mine - also @hussein-awala suggest that we could rename the jobs so that it will also work even if update is done quickly. See #29439 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Pending the two small comments @dstandish @jedcunningham - in case you think there is a reason why job name cannot be changed, pleas shout :)
I tried and this affects a lot of tests, let's do it in a separate PR? |
I am fine with it. |
related: #27561
Adds the ttlSecondsAfterFinished parameter to
migrateDatabaseJob
andcreateUserJob
, so job objects can be automatically deleted after execution.