-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(sdp): Cilium agent server handling SDP conn #39220
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
feat(sdp): Cilium agent server handling SDP conn #39220
Conversation
cc: @bimmlerd |
Hi, unfortunately swamped at the moment, and on PTO starting tomorrow; until Monday - I'll review once I'm back (otherwise, you can always request feedback from the folks who engaged with the first PR!) |
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.
Few nits, but looking good from my perspective. Let's still figure out the UpdateSDP
part, but at least to me it'd be fine to do that in a follow-up.
I added the |
28ece30
to
379f654
Compare
@joestringer Can we add the v1.18 release label to the SDP PRs ? Trying to push this in the v1.18 release. |
I can put it in the v1.18 milestone, but that only expresses intent. It's still up to the contributors and reviewers to collaborate to meet that date. We don't change release timelines for specific features. |
@squeed Friendly for re-review on this. Thanks ! |
379f654
to
2623377
Compare
Much cleaner! This is a lot easier to follow :-). A few more things to take care of. Please squash to one or two commits once you've got this PR where you like. But this is getting close. |
d049e71
to
8d2f234
Compare
/test |
- The PR adds the cilium agent handling of client(sdp) connection. - Using state db to send updates to client with for each connection. Each stream has a watch on the policy rules getting updated. On each update, the agent send the snapshot of the rules to the client. - policyRulesTable will be populated as the agent learns about the rules. Each write is used as trigger to send the updates to the client. - In case of any error on the stream, it is the responsibility of the client to recreate the connection with CA. - Move identityToIP map to statedb Signed-off-by: Vipul Singh <singhvipul@microsoft.com>
8d2f234
to
4319858
Compare
/test |
/ci-clustermesh |
/ci-integration |
/ci-clustermesh |
@vipul-21 Why were the tests failing? I see several re-runs of CI, but no evidence of investigation of the failures. The CI Failure Triage page in the docs describes the expected pattern when encountering a failure. If the tests are repeatedly re-run on a PR, then the default assumption would be that the PR itself is introducing failures into the tree, so we should avoid merging until we know that the PR is not destabilizing the tree. |
Hey @joestringer sorry about that. Here's the investigation on why I retriggered.
On searching the existing issues, found the open issue and a flaky label attached to it. #40130. So re ran the integration test only which passed on the second run.
Since the test failures were not related to the code changes in the PR and same issues were seen elsewhere too, I didn;t investigate further and re ran them. |
@vipul-21 OK thanks for reporting back. Your explanation makes sense. I'd encourage reporting in a similar way if you observe failures unrelated to your PRs again, as this helps to highlight which CI issues we need to focus on, and also makes it clear to reviewers/committers whether there might be reasons to be concerned about how your PR affects CI stability. It turns out that #40130 was pretty easy to reproduce, so I dug in a bit and proposed a fix. #39855 is already being investigated by someone so hopefully we'll resolve that soon enough. |
This PR is following the work done in #38669
StreamPolicyState
, CA stores the stream and reuse the same stream to send the policy rules to the client.For overall flow, please go through the #30984 (comment) and overall SDP PR: #37836
In general the flow is:
The grpc server starts running on a default port if l7proxy and enable-standalone-dns-proxy is true
Cilium agent sends the data to SDP(standalone dns proxy) during endpoint regeneration specifically after the policy cache is updated. There is lock mechanism in the policyCache as well as the FqdnDataServer to make sure that the updates are a snapshot of the current policy state.(and in serialized manner)
StreamPolicyState is called by the client(SDP) on start and cilium agent sents it the current policy rules it has. Otherwise, it stores the stream and write the rules on the same stream for the client to receive.
UpdateMappingRequest is used by the client to send the data(DNS Response mappings) to cilium agent.
Fixes: #30984
Related PRs: #36214, #36215
CFP: cilium/design-cfps#54