-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Short term fix for Cloud Event Source #3761
Conversation
SelfLink is deprecated and is causing an error on Kubernetes v1.20 clusters as outlined in the issue. This is a short term fix that would set the source field to a value that should match the current source URI without the value of the auto-populated selfLink field. Another field could be used for the source field without issue, but could cause concerns about backwards compatibility.
Hi @jmcshane. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
If the maintainers want a longer term solution that does not rely on self link, I'd be willing to do the work on this. As of today, Tekton pipelines installation on Kubernetes v1.20 clusters by default will not send cloud events. The error message can be seen outlined in the linked issue. |
/ok-to-test |
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.
Thank you!
/approve
The following is the coverage report on the affected files.
|
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afrittoli, vdemeester 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 |
Do not use the events package from pipeline as it will send both k8s and cloud events. Send cloud events only instead. The pipeline controller as enough context to decide whether to send an event or not, based on previous and new condition. The cloud events controller instead does not update the pipeline run condition, so it is only aware of the current resource condition. The only option for now is to send and event every time a resource is queued. Pull in pipelines v0.24.3 to get tektoncd/pipeline#3761 which fixes events on k8s 1.20. Extend the cluster role to be able to write k8s events, so that we may write an event in case of reconcile or cloud event delivery failure. Cloud events are now sent when a sink is specified. Note that since resources do not have a condition when they're just started, the start cloud event is not send for now. The controller will have to replicate the logic in the pipelinerun controller to set a condition before the event is sent. Unit tests are passing, but coverage needs to be added. Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Do not use the events package from pipeline as it will send both k8s and cloud events. Send cloud events only instead. The pipeline controller as enough context to decide whether to send an event or not, based on previous and new condition. The cloud events controller instead does not update the pipeline run condition, so it is only aware of the current resource condition. The only option for now is to send and event every time a resource is queued. Pull in pipelines v0.24.3 to get tektoncd/pipeline#3761 which fixes events on k8s 1.20. Extend the cluster role to be able to write k8s events, so that we may write an event in case of reconcile or cloud event delivery failure. Cloud events are now sent when a sink is specified. Note that since resources do not have a condition when they're just started, the start cloud event is not send for now. The controller will have to replicate the logic in the pipelinerun controller to set a condition before the event is sent. Unit tests are passing, but coverage needs to be added. Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Do not use the events package from pipeline as it will send both k8s and cloud events. Send cloud events only instead. The pipeline controller as enough context to decide whether to send an event or not, based on previous and new condition. The cloud events controller instead does not update the pipeline run condition, so it is only aware of the current resource condition. The only option for now is to send and event every time a resource is queued. Pull in pipelines v0.24.3 to get tektoncd/pipeline#3761 which fixes events on k8s 1.20. Extend the cluster role to be able to write k8s events, so that we may write an event in case of reconcile or cloud event delivery failure. Cloud events are now sent when a sink is specified. Note that since resources do not have a condition when they're just started, the start cloud event is not send for now. The controller will have to replicate the logic in the pipelinerun controller to set a condition before the event is sent. Unit tests are passing, but coverage needs to be added. Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Changes
Closes #2676
SelfLink is deprecated and is causing an error on Kubernetes v1.20
clusters as outlined in the issue. This is a short term fix that
would set the source field to a value that should match the current
source URI without the value of the auto-populated selfLink field.
Another field could be used for the source field without issue, but
could cause concerns about backwards compatibility.
/kind bug
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.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes