Skip to content

Pod YAML: Add support for lifecycle.stopSignal #26491

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

ArthurWuTW
Copy link
Contributor

@ArthurWuTW ArthurWuTW commented Jun 23, 2025

What I did

How I did it

  1. Code Analysis:
    25389
    add parsing stop signal logics inside ToSpecGen, and StopSignal is now recognized as a container option inside CreateContainerOptions

  2. Docs: add support for lifecycle.stopSignal in Pod YAML

How to verify it

Add three e2e test cases

  1. Default Case: No StopSignal, defaults to SIGTERM
  2. Positive Case: Pod YAML add StopSignal SIGUSR1
  3. Negative Case: invalid signal string, and error is expected

Release Note

Support for `lifecycle.stopSignal` in Pod YAML

The field allows users to specify a custom stop signal (e.g., SIGUSR1) per container.
If defined, it overrides the default stop signal (SIGTERM) or that defined in the image metadata.

Fixes: containers#25389

Signed-off-by: Arthur Wu <[email protected]>
Copy link
Member

@Luap99 Luap99 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

Copy link
Contributor

openshift-ci bot commented Jun 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ArthurWuTW, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2025
@mheon
Copy link
Member

mheon commented Jun 24, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 7780e28 into containers:main Jun 24, 2025
76 of 77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support stopsignal in kube files
3 participants