You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* xdsclient: preserve original bytes for decoding when the resource is wrapped (#8411)
* xds: Avoid error logs when setting fallback bootstrap config (#8419)
* xdsclient: relay marshalled bytes of complete resource proto to decoders (#8422)
* xds: give up pool lock before closing xdsclient channel (#8445)
* transport: release mutex before returning on expired deadlines in server streams (#8451)
---------
Co-authored-by: Easwar Swaminathan <[email protected]>
Co-authored-by: Arjan Singh Bal <[email protected]>
Co-authored-by: Purnesh Dixit <[email protected]>
Co-authored-by: Doug Fawley <[email protected]>
// If the current pool `p` already contains xDS clients or it is not
249
-
// the `DefaultPool`, the bootstrap config should have been already
250
-
// present in the pool.
251
-
returnnil, nil, fmt.Errorf("xds: bootstrap configuration not set in the pool")
252
-
}
253
-
// If the current pool `p` is the `DefaultPool` and has no clients, it
254
-
// might be the first time an xDS client is being created on it. So,
255
-
// the bootstrap configuration is read from environment variables.
256
-
//
257
-
// DefaultPool is initialized with bootstrap configuration from one of the
258
-
// supported environment variables. If the environment variables are not
259
-
// set, then fallback bootstrap configuration should be set before
260
-
// attempting to create an xDS client, else xDS client creation will fail.
261
-
config, err:=bootstrap.GetConfiguration()
262
-
iferr!=nil {
263
-
returnnil, nil, fmt.Errorf("xds: failed to read xDS bootstrap config from env vars: %v", err)
264
-
}
265
-
p.config=config
259
+
config, err:=p.getConfiguration()
260
+
iferr!=nil {
261
+
returnnil, nil, fmt.Errorf("xds: failed to read xDS bootstrap config from env vars: %v", err)
262
+
}
263
+
264
+
ifconfig==nil {
265
+
// If the environment variables are not set, then fallback bootstrap
266
+
// configuration should be set before attempting to create an xDS client,
267
+
// else xDS client creation will fail.
268
+
config=p.fallbackConfig
269
+
}
270
+
ifconfig==nil {
271
+
returnnil, nil, fmt.Errorf("failed to read xDS bootstrap config from env vars: bootstrap environment variables (%q or %q) not defined and fallback config not set", envconfig.XDSBootstrapFileNameEnv, envconfig.XDSBootstrapFileContentEnv)
0 commit comments