mirror of https://github.com/k3s-io/k3s
Merge pull request #59198 from liubin/fix1
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix typos Fix typos in source code's comment.pull/6/head
commit
11576c3650
|
@ -47,7 +47,7 @@ type Interface interface {
|
||||||
GetRateLimiter() flowcontrol.RateLimiter
|
GetRateLimiter() flowcontrol.RateLimiter
|
||||||
// Resource returns an API interface to the specified resource for this client's
|
// Resource returns an API interface to the specified resource for this client's
|
||||||
// group and version. If resource is not a namespaced resource, then namespace
|
// group and version. If resource is not a namespaced resource, then namespace
|
||||||
// is ignored. The ResourceInterface inherits the paramater codec of this client.
|
// is ignored. The ResourceInterface inherits the parameter codec of this client.
|
||||||
Resource(resource *metav1.APIResource, namespace string) ResourceInterface
|
Resource(resource *metav1.APIResource, namespace string) ResourceInterface
|
||||||
// ParameterCodec returns a client with the provided parameter codec.
|
// ParameterCodec returns a client with the provided parameter codec.
|
||||||
ParameterCodec(parameterCodec runtime.ParameterCodec) Interface
|
ParameterCodec(parameterCodec runtime.ParameterCodec) Interface
|
||||||
|
|
|
@ -202,7 +202,7 @@ func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo,
|
||||||
|
|
||||||
// clientauth.Info object contain both user identification and server identification. We want different precedence orders for
|
// clientauth.Info object contain both user identification and server identification. We want different precedence orders for
|
||||||
// both, so we have to split the objects and merge them separately
|
// both, so we have to split the objects and merge them separately
|
||||||
// we want this order of precedence for user identifcation
|
// we want this order of precedence for user identification
|
||||||
// 1. configAuthInfo minus auth-path (the final result of command line flags and merged .kubeconfig files)
|
// 1. configAuthInfo minus auth-path (the final result of command line flags and merged .kubeconfig files)
|
||||||
// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority)
|
// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority)
|
||||||
// 3. if there is not enough information to identify the user, load try the ~/.kubernetes_auth file
|
// 3. if there is not enough information to identify the user, load try the ~/.kubernetes_auth file
|
||||||
|
@ -474,7 +474,7 @@ func (config *inClusterClientConfig) ClientConfig() (*restclient.Config, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// in-cluster configs only takes a host, token, or CA file
|
// in-cluster configs only takes a host, token, or CA file
|
||||||
// if any of them were individually provided, ovewrite anything else
|
// if any of them were individually provided, overwrite anything else
|
||||||
if config.overrides != nil {
|
if config.overrides != nil {
|
||||||
if server := config.overrides.ClusterInfo.Server; len(server) > 0 {
|
if server := config.overrides.ClusterInfo.Server; len(server) > 0 {
|
||||||
icc.Host = server
|
icc.Host = server
|
||||||
|
|
|
@ -111,7 +111,7 @@ func (g *ClientConfigGetter) IsDefaultConfig(config *restclient.Config) bool {
|
||||||
// ClientConfigLoadingRules is an ExplicitPath and string slice of specific locations that are used for merging together a Config
|
// ClientConfigLoadingRules is an ExplicitPath and string slice of specific locations that are used for merging together a Config
|
||||||
// Callers can put the chain together however they want, but we'd recommend:
|
// Callers can put the chain together however they want, but we'd recommend:
|
||||||
// EnvVarPathFiles if set (a list of files if set) OR the HomeDirectoryPath
|
// EnvVarPathFiles if set (a list of files if set) OR the HomeDirectoryPath
|
||||||
// ExplicitPath is special, because if a user specifically requests a certain file be used and error is reported if thie file is not present
|
// ExplicitPath is special, because if a user specifically requests a certain file be used and error is reported if this file is not present
|
||||||
type ClientConfigLoadingRules struct {
|
type ClientConfigLoadingRules struct {
|
||||||
ExplicitPath string
|
ExplicitPath string
|
||||||
Precedence []string
|
Precedence []string
|
||||||
|
|
Loading…
Reference in New Issue