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 more options for check-reaper cj #635

Merged

Conversation

isaaguilar
Copy link
Contributor

  • added startingDeadlineSeconds to check-reaper's cronjob template

I've been running into issues where the check-reaper has too many missed schedules for whatever reason. I figured adding this is harmless and gives the user an option to configure this without having to patch manually.

Copy link
Collaborator

@integrii integrii left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! Makes sense to me. Just one thing to review.

@@ -26,6 +26,7 @@ spec:
restartPolicy: OnFailure
serviceAccountName: check-reaper
concurrencyPolicy: Forbid
startingDeadlineSeconds: {{ .Values.checkReaper.startingDeadlineSeconds }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add .Values.checkReaper.startingDeadlineSeconds to the values.yaml file here? That way we don't end up templating a blank property in the spec.

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 did add the item to values.yaml and left it intentionally blank since that it the default for a cronjob. There's no way to have a default value defined that would match the same behavior as a nil value.

I was thinking of using an if-statement to only add the field when defined, but a blank spec achieves the same effect. If you think this might cause an issue rendering the template or cause undesired results, I can be a little more explicit. What do you think @integrii

Copy link
Collaborator

Choose a reason for hiding this comment

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

@isaaguilar super sorry for the late reply! i believe that's the way we've been enabling helm values throughout the project if there are no default values provided so it'd be great to stay consistent that way!

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 added an if-statement around startingDeadlineSeconds so blank properties remain out of the spec. Hope this is what we were looking for.

@isaaguilar isaaguilar force-pushed the check-reaper-startingDeadlineSeconds branch from 5068110 to 058a6b3 Compare September 15, 2020 19:24
@@ -128,3 +128,4 @@ checkReaper:
repository: kuberhealthy/check-reaper
tag: v1.4.0
nodeSelector: {}
startingDeadlineSeconds: # Default is nil for CronJobs
Copy link
Collaborator

Choose a reason for hiding this comment

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

similar to how we have it for deployments (https://github.com/Comcast/kuberhealthy/blob/058a6b3a3eb488547199809030aede878b13b632/deploy/helm/kuberhealthy/values.yaml#L38-L39) could you comment out this startingDeadlineSeconds:?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. Forgot to update these values

@isaaguilar isaaguilar force-pushed the check-reaper-startingDeadlineSeconds branch from 058a6b3 to 3615352 Compare September 15, 2020 19:40
@joshulyne joshulyne self-requested a review September 15, 2020 19:41
Copy link
Collaborator

@joshulyne joshulyne left a comment

Choose a reason for hiding this comment

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

lgtm! thanks so much for the quick turnaround!!!

@joshulyne
Copy link
Collaborator

@integrii pinging you since you've gotta re-review!

@integrii integrii merged commit 9d762e2 into kuberhealthy:master Sep 15, 2020
@bbhenry
Copy link

bbhenry commented Sep 22, 2020

What's the plan to make these changes available in helm deployment? The only available versions in the index is 2.1.0 and 2.2.0. None of the minor versions are available for deployment with helm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants