-
Couldn't load subscription status.
- Fork 15.1k
Documentation change for container restart rules #51467
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
Documentation change for container restart rules #51467
Conversation
👷 Deploy Preview for kubernetes-io-vnext-staging processing.
|
|
Welcome @yuanwang04! |
1584f3a to
fb64460
Compare
fb64460 to
07b2126
Compare
07b2126 to
c686fc1
Compare
|
/cc @SergeyKanzhelev The doc change is ready for review, PTAL, thanks! |
0e5cb33 to
595e00e
Compare
content/en/docs/reference/command-line-tools-reference/feature-gates/ContainerRestartRules.md
Show resolved
Hide resolved
76110f3 to
bff050f
Compare
|
Hello @yuanwang04 👋! I'm reaching out from the Docs team. Just checking in as we approach Docs Freeze on Wednesday August 6, 2025 18:00 PDT. This documentation appears to still be under review. To meet the Docs Freeze, this PR must have a technical review as well as lgtm and approve labels applied, without any unaddressed comments or concerns from SIG Docs. Thank you! |
|
Also see: issue #51757 |
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.
/lgtm
I think we should merge this and then iterate. The suggestions in this review show some of the iterating we could do.
|
LGTM label has been added. Git tree hash: 52c47db6223e2cc2fb2c8967988f6d4e0cf74c09
|
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.
/lgtm
I like @lmktfy 's suggestions, but it is ok to follow up later with them
bff050f to
5a0ebb3
Compare
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.
Nits
| {{< feature-state | ||
| feature_gate_name="ContainerRestartRules" >}} |
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.
| {{< feature-state | |
| feature_gate_name="ContainerRestartRules" >}} | |
| {{< feature-state feature_gate_name="ContainerRestartRules" >}} |
Put the shortcode onto a single line.
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.
Ideally yes
| command: ['sh', '-c', 'echo "Keep restarting" && sleep 1800 && exit 1'] | ||
| ``` | ||
| A Pod with Always restart policy with an init container that only execute once. If the init |
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.
| A Pod with Always restart policy with an init container that only execute once. If the init | |
| A Pod with `Always` restart policy with an init container that only execute once. If the init |
Use a consistent style for those values
| command: ['sh', '-c', 'sleep 1800 && exit 0'] | ||
| ``` | ||
| A Pod with Never restart policy with a container that ignores and restarts on specific exit codes. |
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.
| A Pod with Never restart policy with a container that ignores and restarts on specific exit codes. | |
| A Pod with `Never` restart policy with a container that ignores and restarts on specific exit codes. |
| If none of the rules’ conditions matched, Kubernetes fallback to container’s configured | ||
| `restartPolicy`. | ||
|
|
||
| For example, a Pod with OnFailure restart policy that have a `try-once` container. This allows |
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.
| For example, a Pod with OnFailure restart policy that have a `try-once` container. This allows | |
| For example, a Pod with `OnFailure` restart policy that have a `try-once` container. This allows |
| You can configure restarts as a policy that applies to all Pods, or using container-level configuration (for example: when you define a | ||
| {{< glossary_tooltip text="sidecar container" term_id="sidecar-container" >}}). |
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.
| You can configure restarts as a policy that applies to all Pods, or using container-level configuration (for example: when you define a | |
| {{< glossary_tooltip text="sidecar container" term_id="sidecar-container" >}}). | |
| You can configure restarts as a policy that applies to all Pods, or using container-level configuration | |
| (for example: when you define a {{< glossary_tooltip text="sidecar container" term_id="sidecar-container" >}}). |
|
Hello @yuanwang04 👋! I'm reaching out on behalf of the Release Docs team. It looks like this PR is still actively in review with new feedback, although both SIG Node and SIG Docs have given A friendly reminder that Docs Freeze is approaching today, at 18:00 PT (less than 9 hours). This documentation appears to still be under review. To meet the Docs Freeze, this PR must complete a technical review with SIG Node as well as If you wish to include this enhancement in 1.34 but are concerned about meeting the deadline, please consider proactively filing an exception request. Thanks! cc: @kubernetes/sig-node-leads FYSA |
| {{< feature-state | ||
| feature_gate_name="ContainerRestartRules" >}} | ||
|
|
||
| If your cluster has the feature gate `ContainerRestartRules` enabled, you can specify |
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.
We really recommend hyperlinking the phrase "feature gates" to the list of feature gates.
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.
/lgtm
/approve
|
LGTM label has been added. Git tree hash: b82434731d66a53810f9852c8dba7ccbcc661c3f
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lmktfy, SergeyKanzhelev 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 |
|
Good to merge; follow up PRs welcome! |
Description
Add documentation for container restart policy and container restart rules for 1.34.
Issue
kubernetes/enhancements#5307
Closes: #