MCPcopy
hub / github.com/kubernetes/client-go / AnonymousClientConfig

Function AnonymousClientConfig

rest/config.go:491–510  ·  view source on GitHub ↗

AnonymousClientConfig returns a copy of the given config with all user credentials (cert/key, bearer token, and username/password) and custom transports (WrapTransport, Transport) removed

(config *Config)

Source from the content-addressed store, hash-verified

489
490// AnonymousClientConfig returns a copy of the given config with all user credentials (cert/key, bearer token, and username/password) and custom transports (WrapTransport, Transport) removed
491func AnonymousClientConfig(config *Config) *Config {
492 // copy only known safe fields
493 return &Config{
494 Host: config.Host,
495 APIPath: config.APIPath,
496 ContentConfig: config.ContentConfig,
497 TLSClientConfig: TLSClientConfig{
498 Insecure: config.Insecure,
499 ServerName: config.ServerName,
500 CAFile: config.TLSClientConfig.CAFile,
501 CAData: config.TLSClientConfig.CAData,
502 },
503 RateLimiter: config.RateLimiter,
504 UserAgent: config.UserAgent,
505 QPS: config.QPS,
506 Burst: config.Burst,
507 Timeout: config.Timeout,
508 Dial: config.Dial,
509 }
510}
511
512// CopyConfig returns a copy of the given config
513func CopyConfig(config *Config) *Config {

Callers 1

TestAnonymousConfigFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAnonymousConfigFunction · 0.68