-
Notifications
You must be signed in to change notification settings - Fork 97
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
/kind bug
This method is not used. We should remove it:
// ClientConfigWithAPIEndpoint returns a client config.
func (s *ClusterScope) ClientConfigWithAPIEndpoint(ctx context.Context, endpoint clusterv1.APIEndpoint) (clientcmd.ClientConfig, error) {
c, err := s.ClientConfig(ctx)
if err != nil {
return nil, err
}
raw, err := c.RawConfig()
if err != nil {
return nil, fmt.Errorf("error retrieving rawConfig from clientConfig: %w", err)
}
// update cluster endpoint in config
for key := range raw.Clusters {
raw.Clusters[key].Server = fmt.Sprintf("https://%s:%d", endpoint.Host, endpoint.Port)
}
return clientcmd.NewDefaultClientConfig(raw, &clientcmd.ConfigOverrides{}), nil
}Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers