Skip to content

Extend default SIG{TERM,KILL} window to allow Pelican conn draining - #7

Open
brianhlin wants to merge 1 commit into
PelicanPlatform:mainfrom
brianhlin:extend-sigterm-kill-window
Open

Extend default SIG{TERM,KILL} window to allow Pelican conn draining#7
brianhlin wants to merge 1 commit into
PelicanPlatform:mainfrom
brianhlin:extend-sigterm-kill-window

Conversation

@brianhlin

Copy link
Copy Markdown
Contributor

As suggested by @h2zh

Copilot AI lite review requested due to automatic review settings August 5, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the Helm chart’s Deployment behavior to give the Pelican cache more time to gracefully shut down (drain connections) before Kubernetes escalates from SIGTERM to SIGKILL.

Changes:

  • Set terminationGracePeriodSeconds: 75 in the pod spec to allow connection draining.
  • Bump chart version from 0.2.4 to 0.2.5.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
templates/deployment.yaml Extends pod termination grace period to allow Pelican/XRootD shutdown/drain time.
Chart.yaml Increments chart version to reflect the behavioral change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread templates/deployment.yaml
Comment on lines +24 to +26
# Allow Pelican to drain connections
# Default Xrootd.ShutdownTimeout of 60s + 15s buffer
terminationGracePeriodSeconds: 75

@brianhlin brianhlin Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can you do math in Helm templating??

EDIT: I guess we could just use what they specify and otherwise default to 75s

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can do math with the add function, e.g. {{ add .Values.foo 15 }}
https://helm.sh/docs/chart_template_guide/function_list/#math-functions

@matyasselmeci

Copy link
Copy Markdown
Contributor

Yeah, I'd say do something like the following instead:

to values.yaml add, under cacheConfig:

shutdownTimeoutSeconds: 60

to the spec in deployment.yaml:

terminationGracePeriodSeconds: {{ add .Values.shutdownTimeoutSeconds 15 }}

to configmap-pelican.yaml:

Xrootd.ShutdownTimeout: {{ .Values.shutdownTimeoutSeconds }}s

(untested)

Also be sure to update README.md.

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.

3 participants