-
Notifications
You must be signed in to change notification settings - Fork 216
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 a pod stage for failing an initContainer #1019
Conversation
✅ Deploy Preview for k8s-kwok canceled.
|
/cc @wzshiming |
afe6c57
to
f50a28e
Compare
apiVersion: kwok.x-k8s.io/v1alpha1 | ||
kind: Stage | ||
metadata: | ||
name: pod-init-container-running-failed |
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.
Rename the file name to match this one.
IMO, one should distinguish between creating and running failed.
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.
Renamed the file to pod-init-container-running-failed.yaml
.
Thanks for the fixes, @wzshiming! All the changes were committed. I still have two questions.
|
Sure, set both
Yes, the |
Change labels to annotations Replace labels with annotations Rename label and annotation names Change label value True to true Rename label and annotations Update kustomize/stage/pod/chaos/pod-init-container-failed.yaml Co-authored-by: Shiming Zhang <[email protected]> rename and set default duration values
Set both
My question was whether we should distinguish an initContainers defined before the failed initContainers and one after the failed initContainer. The former's state is |
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
Thank you, I think it's a good start for chaos testing
Removed the WIP label. Can you approve it again? Thanks! |
/retest |
Fixed the linkyaml issues (trailing spaces). PTAL, @wzshiming. Thanks! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wzshiming, yuanchen8911 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 |
* Add a pod stage file for failing an initContainer Change labels to annotations Replace labels with annotations Rename label and annotation names Change label value True to true Rename label and annotations Update kustomize/stage/pod/chaos/pod-init-container-failed.yaml Co-authored-by: Shiming Zhang <[email protected]> rename and set default duration values * Fix the yamllint issues (trailing spaces)
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds a pod stage that injects an error to initContainer specified by a label and annotations, including the initContainer's name and optional failure message, reason, exit code and delay parameters.
Which issue(s) this PR fixes:
Fixes #
None
Special notes for your reviewer:
Questions:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: