NewClientConfigFromBytes takes your kubeconfig and gives you back a ClientConfig
(configBytes []byte)
| 101 | |
| 102 | // NewClientConfigFromBytes takes your kubeconfig and gives you back a ClientConfig |
| 103 | func NewClientConfigFromBytes(configBytes []byte) (ClientConfig, error) { |
| 104 | config, err := Load(configBytes) |
| 105 | if err != nil { |
| 106 | return nil, err |
| 107 | } |
| 108 | |
| 109 | return &DirectClientConfig{*config, "", &ConfigOverrides{}, nil, nil, promptedCredentials{}}, nil |
| 110 | } |
| 111 | |
| 112 | // RESTConfigFromKubeConfig is a convenience method to give back a restconfig from your kubeconfig bytes. |
| 113 | // For programmatic access, this is what you want 80% of the time |
no test coverage detected