-
Notifications
You must be signed in to change notification settings - Fork 9
Implement executionhook controller #4
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
Implement executionhook controller #4
Conversation
|
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/check cla |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ashish-amarnath The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
af89594 to
3fc948e
Compare
|
/check cla |
32ec242 to
470307f
Compare
Signed-off-by: Adnan Abdulhussein <prydonius@gmail.com>
* QoL improvements in makefile Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Ashish Amarnath <ashisham@vmware.com> untested change Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
470307f to
f05b3ab
Compare
5bae119 to
afccff6
Compare
Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
afccff6 to
84f28da
Compare
kow3ns
left a comment
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.
Looks good overall. One comment on the API and the testing is a bit sparse, but its a great start!
| // The last error encountered when executing the action. The hook controller might | ||
| // update this field each time it retries the execution. | ||
| // +optional | ||
| Error *HookError `json:"error,omitempty" protobuf:"bytes,5,opt,name=error"` |
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.
There can be only one error? That is not an unreasonable assumption. However, this pattern seems to be similar to the Conditions pattern implemented by most built in types. Is there a reason to go with a singular error over Status.Conditions?
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.
The expectation is that the error represents the error condition encountered executing the hook action on a specific container in a pod. So there is a 1:1 mapping between where the hook action was executed (Pod,Container) and an error condition, if any. For that reason, using a singular error was thought of as a better fit. However, using Status.Conditions would be more appropriate if/ when we aggregate the errors into the status of the ExecutionHook object.
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.
| // More error types could be added, e.g., Forbidden, Unauthorized, AlreadyInProgress, etc. | ||
| const ( | ||
| // The execution hook times out | ||
| Timeout ErrorType = "Timeout" |
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.
Another reason to consider using the Conditions pattern. This proposal might encourage end users to build a state machine off the error conditions (which as you point out in the comment) are likely to be extended and change. Across the rest of the API we generally avoid this as we've learned that its brittle.
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.
Thanks for the suggestion. I will revisit this as I iterate on the implementation. WDYT?
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.
@kow3ns If Conditions pattern is used, end user can still add more condition types?
|
Hi @ashish-amarnath, should this PR be dependent on #5? |
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
|
/lifecycle frozen |
|
The This bot removes
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /remove-lifecycle frozen |
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
|
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Implement executionhook controller
Signed-off-by: Ashish Amarnath ashisham@vmware.com