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 spec values to coordinator and worker deployments #236

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

amarthey
Copy link

@amarthey amarthey commented Oct 2, 2024

Adding deployment spec values for coordinator deployment and worker deployment:

 - progressDeadlineSeconds
 - revisionHistoryLimit
 - strategy

This is needed for us in case of an update of Trino Cluster that requires the deployment to bring pods up and down.

Copy link

cla-bot bot commented Oct 2, 2024

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@amarthey
Copy link
Author

amarthey commented Oct 2, 2024

I sent the signed CLA on 9/26 😃

@nineinchnick
Copy link
Member

The CLAs are processed every two weeks or so. If you've already sent it, don't worry about it, I'll keep an eye on them

Copy link
Member

@nineinchnick nineinchnick left a comment

Choose a reason for hiding this comment

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

It's a good change, but any new properties need to be documented. You'll have to regenerate the charts readme. See the repo readme for instructions on how to do that.

{{- if .Values.coordinator.deployment.progressDeadlineSeconds }}
progressDeadlineSeconds: {{ .Values.coordinator.deployment.progressDeadlineSeconds }}
{{- end }}
{{- if or .Values.coordinator.deployment.revisionHistoryLimit (eq 0 .Values.coordinator.deployment.revisionHistoryLimit) }}
Copy link
Member

Choose a reason for hiding this comment

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

It might be easier to read this condition if it checked if the value is not an empty string

Copy link
Author

@amarthey amarthey Oct 4, 2024

Choose a reason for hiding this comment

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

Sounds good.
Important thing to notice here is that, if the user sets revisionHistoryLimit: 0 then they explicitly want to clean up all history.
However in Helm, having foo: 0 is treated as if omitted.

We could either do:

  1. {{- if (ne "" .Values.coordinator.deployment.revisionHistoryLimit) }} (maybe the easiest to read)
  2. {{- if not (eq "" .Values.coordinator.deployment.revisionHistoryLimit) }}

Copy link
Member

Choose a reason for hiding this comment

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

Maybe it would be best to have a non-nil default? K8s docs say the default for revisionHistoryLimit is 10.

charts/trino/values.yaml Show resolved Hide resolved
charts/trino/values.yaml Show resolved Hide resolved
@amarthey
Copy link
Author

amarthey commented Oct 4, 2024

ons on how to do that.

This is my first PR and I did not know about that. Let me address your comments

@cla-bot cla-bot bot added the cla-signed label Oct 4, 2024
@@ -47,6 +47,11 @@ secretMounts:
path: /etc/trino/certificates

coordinator:
deployment:
progressDeadlineSeconds: ~
Copy link
Author

Choose a reason for hiding this comment

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

Also @nineinchnick , not sure how you want to test this new values?
Do you want me to add some specific values here? It does not seems that you guys testing Deployment Spec diffs.

Copy link
Member

Choose a reason for hiding this comment

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

  • Just a basic smoke test that Trino deploys with these values set

Copy link
Member

Choose a reason for hiding this comment

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

Set values here that are different than the defaults.

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

Successfully merging this pull request may close these issues.

2 participants