-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Calico enable support for eBPF #7618
Calico enable support for eBPF #7618
Conversation
Hi @cristicalin. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
470fbbe
to
65b1798
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.
/ok-to-test
- name: "Check supported calico versions" | ||
assert: | ||
that: | ||
- "calico_version in calico_crds_archive_checksums.keys()" |
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.
Here we need to fix indent to pass yamlint job.
$ yamllint --strict .
./roles/network_plugin/calico/tasks/check.yml
5:6 error wrong indentation: expected 6 but found 5 (indentation)
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.
Sorry about that, it is fixed in the last push.
1c0f632
to
a2439c7
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.
Thanks for updating, still some questions before merging.
/ok-to-test
assert: | ||
that: | ||
- "calico_version is version('v3.19.0','>=')" | ||
msg: "you should use calico 3.19.0 or newer with eBPF dataplane" |
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.
Just question:
According to https://www.projectcalico.org/introducing-the-calico-ebpf-dataplane/ which is mentioned in this pr, eBPF dataplane is implemented since Calico v3.13 as tech review.
Is that GA since v3.19?
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.
No, this is just from some discussions I had with project calico staff on their slack. I actually did the development for this PR on 3.18.3 and it worked OK but their recommendation was to use 3.19.0 as they would not invest into debugging older releases.
We can relax this completely but I would need to test with all the older versions to confirm behavior.
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've tested 3.16.10, 3.17.4 and 3.18.3 and I was able to do successful deployments with all 3 versions. As such I removed this dependency and dropped the 3.19.0 change from this PR in favor of opening a separate one for the new calico version: #7630
periodSeconds: 10 | ||
initialDelaySeconds: 10 | ||
failureThreshold: 6 | ||
{% endif %} |
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.
Is the above change for Calico v3.19.0? not for eBPF?
I could not find the relationship between the above change and eBPF.
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.
This is for v3.19.0 not strictly for eBPF. This liveness probe mechanism is not available in 3.18 and prior versions.
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.
@cristicalin Thanks for your clear explanation, I got it.
Then it is better to merge #7630 before this.
@@ -39,8 +42,6 @@ rules: | |||
verbs: | |||
- use | |||
{% elif calico_datastore == "kdd" %} | |||
# Calico stores some configuration information in node annotations. | |||
- update |
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.
Why do we need to move this part for eBPF?
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.
This is actually an unrelated fix, if you look at the upstream manifests the update
applies to the nodes/status
resource not policy
. I can't help feeling this was actually a security issue in kubespray deployments allowing Calico service account to update policies that it shouldn't.
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.
So, I did some re-reading of this portion of the code and it seems that node annotations are only relevant with kdd
in which case I was wrong to move that part around, I fixed it in the new push.
a3657c3
to
99b2cd7
Compare
/retest |
99b2cd7
to
2c9cf58
Compare
2c9cf58
to
76e22ea
Compare
/lgtm |
* allow enabling typha prometheus metrics
* manage the kubernetes-services-endpoint configmap
* enforce disabling kube-proxy when using eBPF dataplane * ensure calico_version is supported
76e22ea
to
5f43fb1
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cristicalin, floryut 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 |
* Calico: align manifests with upstream * allow enabling typha prometheus metrics * Calico: enable eBPF support * manage the kubernetes-services-endpoint configmap * Calico: document the use of eBPF dataplane * Calico: improve checks before deployment * enforce disabling kube-proxy when using eBPF dataplane * ensure calico_version is supported
* Calico: align manifests with upstream * allow enabling typha prometheus metrics * Calico: enable eBPF support * manage the kubernetes-services-endpoint configmap * Calico: document the use of eBPF dataplane * Calico: improve checks before deployment * enforce disabling kube-proxy when using eBPF dataplane * ensure calico_version is supported
What type of PR is this?
/kind feature
What this PR does / why we need it:
Calico supports the eBPF dataplane in more modern distributions like Ubuntu 20.04, CentOS 8 (and streams) and newer. This PR enables the necessary capabilities to enable eBPF.
While this PR does not provide a single setting (due to the nature of how eBPF is enabled in Calico), it does document the complete process to set it up.
For the time being, we are missing way for calico-node to access the
kube-api
correctly. The current assumption in Calico is that there is an external loadbalancer that services the kubernetes cluster which may not be true for some kubespray deployments.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: