-
Notifications
You must be signed in to change notification settings - Fork 420
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
init-webhook #21
init-webhook #21
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
3ebc61b
to
9b9a18f
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Thanks for working on this @vincent-pli !! @vdemeester was suggesting in #18 (comment) that we look into the injection based controllers, I assume we can use that for the webhook controller too |
@bobcatfish |
hm I thought you would be able to use the injection interface for webhooks too, but looking at pipelines we don't seem to be using it 🤔 https://github.com/tektoncd/pipeline/blob/196a945c2dd795b9ef5e516f365e69c69218754e/cmd/webhook/main.go#L42 (maybe @vdemeester just didn't have a chance to update it!) @vdemeester do you know if it's possible to use the injection interface for webhook controllers too? |
@bobcatfish I am looking into that 😉 (both for here and pipelines 😉 ) |
@bobcatfish @vdemeester |
9b9a18f
to
fe00d68
Compare
@iancoffey that's broken the
since the new Could we rollback to |
@vincent-pli Yes indeed, sounds like we may need to rollback to Matching what Pipelines has defined sounds reasonable to me. |
@iancoffey |
/retest |
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.
Hi @vincent-pli, thanks for working on the webhook controller! I just saw that this PR was ready for review, so sorry that it didn't get reviewed sooner. Overall it looks really good, I just have a handful of comments/questions. 🙂
v1alpha1.SchemeGroupVersion.WithKind("TriggerTemplate"): &v1alpha1.TriggerTemplate{}, | ||
}, | ||
Logger: logger, | ||
} |
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.
I'm not entirely sure what the WithContext:
field does in the pipeline
webhook, but is there a reason why we don't want to include it here?
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 propose of this setting is try to put some default value in to context
, I guess we still not ready for this part, anyway, I add one, just return the parameter itself.
WithContext: func(ctx context.Context) context.Context {
return ctx
},
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.
If it's not used, I think you can just skip this field altogether. It can be used to pass some value/key to tell the controller that it will need to update some version to set defaults, etc..
752b9e5
to
e4ce944
Compare
e4ce944
to
4b7cec3
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.
Hi @vincent-pli, thank you for making the updates! I just have a few nits before I'm ready to approve your PR (the only one that's stopping me from approving the PR right now is the 200-clusterrole.yaml comment). 😄
Thanks for making those changes @vincent-pli, looks great! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ncskier, vincent-pli 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 |
I just noticed @vincent-pli - in future we want to make sure that commit messages follow our commit message guidelines - it can be a bit hard to do while responding to feedback on a PR tho 🙏 Sometimes amending one commit as you go can be a bit easier. |
Sorry, I missed the commit messages when reviewing 😓 |
No worries @ncskier I did too! Thanks for tolerating the nag 😜 |
@bobcatfish @ncskier |
Changes
webhook
useknative/pkg
andtektoncd/pipeline
ko
related configuration filesWIP:
type
s depends on #17type
s must implementGenericCRD
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes