Skip to content
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

sds: simplify implementation to reduce dependencies #50828

Merged
merged 9 commits into from May 13, 2024

Conversation

kyessenov
Copy link
Contributor

Issue: #50134

This brings down the binary size for pilot-agent to under 30MB.

CC @dpasiukevich

Change-Id: Ie9e4dd8a0a404671616e2fd1b97ffbe558fa85d1
Signed-off-by: Kuat Yessenov <[email protected]>
Change-Id: I7b318d10d4809ea97693d587425bafbd22f53b6a
Signed-off-by: Kuat Yessenov <[email protected]>
Change-Id: Id8d118a96f38895a6e0e334a2d9a57645e9b53d6
Signed-off-by: Kuat Yessenov <[email protected]>
@kyessenov kyessenov requested review from a team as code owners May 2, 2024 20:46
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 2, 2024
@kyessenov kyessenov added the release-notes-none Indicates a PR that does not require release notes. label May 2, 2024
@kyessenov
Copy link
Contributor Author

/retest

Change-Id: Ice126f4bcbbc364c511139cf21fe5e5f4991de51
Signed-off-by: Kuat Yessenov <[email protected]>
@kyessenov
Copy link
Contributor Author

I don't quite understand where /debug/syncz is implemented in the agent - I thought I dropped discovery server debug handlers.

@howardjohn
Copy link
Member

The syncz is

func (p *XdsProxy) initDebugInterface(port int) error {
. its not implementing syncz itself, its a proxy server to Istiod

Change-Id: I1341a3a0eef107f8ba4d3c500bf43163a989833c
Change-Id: Ia02658149db8f3f5d663774de75733cb067a7250
Signed-off-by: Kuat Yessenov <[email protected]>
@kyessenov
Copy link
Contributor Author

@howardjohn OK, that will pull all the Envoy protos used in listener, cluster, route, and extensions -- something we don't want to do just for debug endpoint. I removed that test since it doesn't seem to be critical -- you can decode Protos out of band.

Change-Id: Iee6a5007352cc433ab572c9c18bb79e0f5e38f30
@kyessenov
Copy link
Contributor Author

@syw14 I think this change is fine because istioctl x proxy-status --xds-via-agents is still passing. On the wire, agent is sending the content base64 encoded Any, which istioctl is capable of decoding.

@syw14 syw14 self-requested a review May 8, 2024 20:18
@kyessenov
Copy link
Contributor Author

@igsong confirmed this change doesn't break gcloud debug command. Thank you @igsong .

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label May 10, 2024
@@ -33,6 +33,7 @@ import (
"istio.io/istio/pkg/test/util/assert"
"istio.io/istio/pkg/util/sets"
"istio.io/istio/pkg/workloadapi"
xdsserver "istio.io/istio/pkg/xds"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
xdsserver "istio.io/istio/pkg/xds"
"istio.io/istio/pkg/xds"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package name conflict.

@@ -41,6 +41,7 @@ import (
"istio.io/istio/pkg/spiffe"
"istio.io/istio/pkg/test/env"
"istio.io/istio/pkg/util/sets"
xdsserver "istio.io/istio/pkg/xds"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, with pilot/test/xds.

resources := model.Resources{}
var version uberatomic.Uint64

func (s *sdsservice) generate(resourceNames []string) (*discovery.DiscoveryResponse, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel a little duplicate if we write a bunch of methods again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the version? Yes, but it's just two lines. It would be more code if we share.

Change-Id: Ie383aa56c5d8d0e6c8553faa5d6335b3e94e4199
Signed-off-by: Kuat Yessenov <[email protected]>
Change-Id: I084740c88ed006f593384d4f8eb0cf42a3200274
Signed-off-by: Kuat Yessenov <[email protected]>
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label May 13, 2024
@istio-testing istio-testing merged commit eacdbed into istio:master May 13, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants