Skip to content

feat(tonic-xds): A27 bootstrap config from env var#2535

Open
YutaoMa wants to merge 2 commits intohyperium:masterfrom
YutaoMa:yutaoma/tonic-xds-config
Open

feat(tonic-xds): A27 bootstrap config from env var#2535
YutaoMa wants to merge 2 commits intohyperium:masterfrom
YutaoMa:yutaoma/tonic-xds-config

Conversation

@YutaoMa
Copy link
Collaborator

@YutaoMa YutaoMa commented Mar 3, 2026

Motivation

Ref: #2444

gRFC A27 specifies how gRPC clients can use GRPC_XDS_BOOTSTRAP to bootstrap xDS (reference). There is also GRPC_XDS_BOOTSTRAP_CONFIG for inline config (reference). This PR wires in both.

Solution

For now because we haven't added xDS client building logic in tonic-xds yet, this PR stores the parsed and validated config into the newly introduced BootstrapConfig struct. Subsequent PRs will implement the logic to feed this config into xDS client builder.

@YutaoMa YutaoMa force-pushed the yutaoma/tonic-xds-config branch from a1214ab to 37735c0 Compare March 3, 2026 23:23
@YutaoMa YutaoMa marked this pull request as ready for review March 4, 2026 00:05
Copy link
Collaborator

@gu0keno0 gu0keno0 left a comment

Choose a reason for hiding this comment

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

I tend to think we should still support directly passing bootstrap configs as structs.

In many cases, either file or env var is cumbersome to use

@YutaoMa YutaoMa force-pushed the yutaoma/tonic-xds-config branch from 39b5790 to 9135880 Compare March 12, 2026 22:55
}

/// Convert the bootstrap node config to an `xds_client::Node`.
pub(crate) fn to_node(&self) -> Node {
Copy link
Collaborator

Choose a reason for hiding this comment

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

in rust to_node will mean that you are consuming self, maybe we should consume self and let the caller clone if they want to keep config around

Also better to implement From trait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants