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

xds bootstrap: support config content in env variable #4153

Merged
merged 6 commits into from Jan 15, 2021

Conversation

menghanl
Copy link
Contributor

@menghanl menghanl commented Jan 14, 2021

  1. If GRPC_XDS_BOOTSTRAP exists then use its value as the name of the bootstrap file. If the file is missing or the contents of the file are malformed, return an error.
  2. Else, if GRPC_XDS_BOOTSTRAP_CONFIG exists then use its value as the bootstrap config. If the value is malformed, return an error.

fixes #4127

@menghanl menghanl requested a review from dfawley January 14, 2021 19:56
@menghanl menghanl added this to the 1.36 Release milestone Jan 14, 2021
@menghanl menghanl added the Type: Feature New features or improvements in behavior label Jan 14, 2021
return []byte(fContent), nil
}

return nil, fmt.Errorf("none of the bootstrap environment variables (%q or %q) defined", "GRPC_XDS_BOOTSTRAP", "GRPC_XDS_BOOTSTRAP_CONFIG")
Copy link
Member

Choose a reason for hiding this comment

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

Should we export consts for those strings and reference them here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do have consts for them, but they are in another package.
Exported those and used them here.

@dfawley dfawley assigned menghanl and unassigned dfawley Jan 15, 2021
@menghanl menghanl merged commit ef9850d into grpc:master Jan 15, 2021
@menghanl menghanl deleted the bootstrap_env_content branch January 15, 2021 19:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xds: support env variable GRPC_XDS_BOOTSTRAP_CONFIG for bootstrap config content
2 participants