mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Rename the KubeConfigFile field to Kubeconfig in ClientConnectionConfiguration
This commit is contained in:
parent
652cebcba5
commit
2ff9bd6699
@ -57,7 +57,6 @@ API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentT
|
|||||||
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,Type
|
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,Type
|
||||||
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,IntVal
|
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,IntVal
|
||||||
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,StrVal
|
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,StrVal
|
||||||
API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,ClientConnectionConfiguration,KubeConfigFile
|
|
||||||
API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,CloudControllerManagerConfiguration,CloudProvider
|
API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,CloudControllerManagerConfiguration,CloudProvider
|
||||||
API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,CloudControllerManagerConfiguration,Debugging
|
API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,CloudControllerManagerConfiguration,Debugging
|
||||||
API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,CloudControllerManagerConfiguration,GenericComponent
|
API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,CloudControllerManagerConfiguration,GenericComponent
|
||||||
|
@ -54,7 +54,7 @@ func (o *DeprecatedOptions) AddFlags(fs *pflag.FlagSet, cfg *componentconfig.Kub
|
|||||||
|
|
||||||
fs.BoolVar(&cfg.EnableProfiling, "profiling", cfg.EnableProfiling, "DEPRECATED: enable profiling via web interface host:port/debug/pprof/")
|
fs.BoolVar(&cfg.EnableProfiling, "profiling", cfg.EnableProfiling, "DEPRECATED: enable profiling via web interface host:port/debug/pprof/")
|
||||||
fs.BoolVar(&cfg.EnableContentionProfiling, "contention-profiling", cfg.EnableContentionProfiling, "DEPRECATED: enable lock contention profiling, if profiling is enabled")
|
fs.BoolVar(&cfg.EnableContentionProfiling, "contention-profiling", cfg.EnableContentionProfiling, "DEPRECATED: enable lock contention profiling, if profiling is enabled")
|
||||||
fs.StringVar(&cfg.ClientConnection.KubeConfigFile, "kubeconfig", cfg.ClientConnection.KubeConfigFile, "DEPRECATED: path to kubeconfig file with authorization and master location information.")
|
fs.StringVar(&cfg.ClientConnection.Kubeconfig, "kubeconfig", cfg.ClientConnection.Kubeconfig, "DEPRECATED: path to kubeconfig file with authorization and master location information.")
|
||||||
fs.StringVar(&cfg.ClientConnection.ContentType, "kube-api-content-type", cfg.ClientConnection.ContentType, "DEPRECATED: content type of requests sent to apiserver.")
|
fs.StringVar(&cfg.ClientConnection.ContentType, "kube-api-content-type", cfg.ClientConnection.ContentType, "DEPRECATED: content type of requests sent to apiserver.")
|
||||||
fs.Float32Var(&cfg.ClientConnection.QPS, "kube-api-qps", cfg.ClientConnection.QPS, "DEPRECATED: QPS to use while talking with kubernetes apiserver")
|
fs.Float32Var(&cfg.ClientConnection.QPS, "kube-api-qps", cfg.ClientConnection.QPS, "DEPRECATED: QPS to use while talking with kubernetes apiserver")
|
||||||
fs.Int32Var(&cfg.ClientConnection.Burst, "kube-api-burst", cfg.ClientConnection.Burst, "DEPRECATED: burst to use while talking with kubernetes apiserver")
|
fs.Int32Var(&cfg.ClientConnection.Burst, "kube-api-burst", cfg.ClientConnection.Burst, "DEPRECATED: burst to use while talking with kubernetes apiserver")
|
||||||
|
@ -263,14 +263,14 @@ func makeLeaderElectionConfig(config componentconfig.KubeSchedulerLeaderElection
|
|||||||
// createClients creates a kube client and an event client from the given config and masterOverride.
|
// createClients creates a kube client and an event client from the given config and masterOverride.
|
||||||
// TODO remove masterOverride when CLI flags are removed.
|
// TODO remove masterOverride when CLI flags are removed.
|
||||||
func createClients(config componentconfig.ClientConnectionConfiguration, masterOverride string, timeout time.Duration) (clientset.Interface, clientset.Interface, v1core.EventsGetter, error) {
|
func createClients(config componentconfig.ClientConnectionConfiguration, masterOverride string, timeout time.Duration) (clientset.Interface, clientset.Interface, v1core.EventsGetter, error) {
|
||||||
if len(config.KubeConfigFile) == 0 && len(masterOverride) == 0 {
|
if len(config.Kubeconfig) == 0 && len(masterOverride) == 0 {
|
||||||
glog.Warningf("Neither --kubeconfig nor --master was specified. Using default API client. This might not work.")
|
glog.Warningf("Neither --kubeconfig nor --master was specified. Using default API client. This might not work.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// This creates a client, first loading any specified kubeconfig
|
// This creates a client, first loading any specified kubeconfig
|
||||||
// file, and then overriding the Master flag, if non-empty.
|
// file, and then overriding the Master flag, if non-empty.
|
||||||
kubeConfig, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
|
kubeConfig, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
|
||||||
&clientcmd.ClientConfigLoadingRules{ExplicitPath: config.KubeConfigFile},
|
&clientcmd.ClientConfigLoadingRules{ExplicitPath: config.Kubeconfig},
|
||||||
&clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterOverride}}).ClientConfig()
|
&clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterOverride}}).ClientConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
|
@ -142,7 +142,7 @@ users:
|
|||||||
options: &Options{
|
options: &Options{
|
||||||
ComponentConfig: componentconfig.KubeSchedulerConfiguration{
|
ComponentConfig: componentconfig.KubeSchedulerConfiguration{
|
||||||
ClientConnection: componentconfig.ClientConnectionConfiguration{
|
ClientConnection: componentconfig.ClientConnectionConfiguration{
|
||||||
KubeConfigFile: flagKubeconfig}}},
|
Kubeconfig: flagKubeconfig}}},
|
||||||
expectedUsername: "flag",
|
expectedUsername: "flag",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -22,15 +22,15 @@ import (
|
|||||||
|
|
||||||
// ClientConnectionConfiguration contains details for constructing a client.
|
// ClientConnectionConfiguration contains details for constructing a client.
|
||||||
type ClientConnectionConfiguration struct {
|
type ClientConnectionConfiguration struct {
|
||||||
// kubeConfigFile is the path to a kubeconfig file.
|
// kubeconfig is the path to a KubeConfig file.
|
||||||
KubeConfigFile string
|
Kubeconfig string
|
||||||
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
||||||
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
||||||
// client.
|
// client.
|
||||||
AcceptContentTypes string
|
AcceptContentTypes string
|
||||||
// contentType is the content type used when sending data to the server from this client.
|
// contentType is the content type used when sending data to the server from this client.
|
||||||
ContentType string
|
ContentType string
|
||||||
// cps controls the number of queries per second allowed for this connection.
|
// qps controls the number of queries per second allowed for this connection.
|
||||||
QPS float32
|
QPS float32
|
||||||
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
||||||
Burst int32
|
Burst int32
|
||||||
|
@ -22,15 +22,15 @@ import (
|
|||||||
|
|
||||||
// ClientConnectionConfiguration contains details for constructing a client.
|
// ClientConnectionConfiguration contains details for constructing a client.
|
||||||
type ClientConnectionConfiguration struct {
|
type ClientConnectionConfiguration struct {
|
||||||
// kubeConfigFile is the path to a kubeconfig file.
|
// kubeconfig is the path to a KubeConfig file.
|
||||||
KubeConfigFile string `json:"kubeconfig"`
|
Kubeconfig string `json:"kubeconfig"`
|
||||||
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
||||||
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
||||||
// client.
|
// client.
|
||||||
AcceptContentTypes string `json:"acceptContentTypes"`
|
AcceptContentTypes string `json:"acceptContentTypes"`
|
||||||
// contentType is the content type used when sending data to the server from this client.
|
// contentType is the content type used when sending data to the server from this client.
|
||||||
ContentType string `json:"contentType"`
|
ContentType string `json:"contentType"`
|
||||||
// cps controls the number of queries per second allowed for this connection.
|
// qps controls the number of queries per second allowed for this connection.
|
||||||
QPS float32 `json:"qps"`
|
QPS float32 `json:"qps"`
|
||||||
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
||||||
Burst int32 `json:"burst"`
|
Burst int32 `json:"burst"`
|
||||||
|
@ -446,7 +446,7 @@ func Convert_componentconfig_CSRSigningControllerConfiguration_To_v1alpha1_CSRSi
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha1_ClientConnectionConfiguration_To_componentconfig_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *componentconfig.ClientConnectionConfiguration, s conversion.Scope) error {
|
func autoConvert_v1alpha1_ClientConnectionConfiguration_To_componentconfig_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *componentconfig.ClientConnectionConfiguration, s conversion.Scope) error {
|
||||||
out.KubeConfigFile = in.KubeConfigFile
|
out.Kubeconfig = in.Kubeconfig
|
||||||
out.AcceptContentTypes = in.AcceptContentTypes
|
out.AcceptContentTypes = in.AcceptContentTypes
|
||||||
out.ContentType = in.ContentType
|
out.ContentType = in.ContentType
|
||||||
out.QPS = in.QPS
|
out.QPS = in.QPS
|
||||||
@ -460,7 +460,7 @@ func Convert_v1alpha1_ClientConnectionConfiguration_To_componentconfig_ClientCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_componentconfig_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *componentconfig.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error {
|
func autoConvert_componentconfig_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *componentconfig.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error {
|
||||||
out.KubeConfigFile = in.KubeConfigFile
|
out.Kubeconfig = in.Kubeconfig
|
||||||
out.AcceptContentTypes = in.AcceptContentTypes
|
out.AcceptContentTypes = in.AcceptContentTypes
|
||||||
out.ContentType = in.ContentType
|
out.ContentType = in.ContentType
|
||||||
out.QPS = in.QPS
|
out.QPS = in.QPS
|
||||||
|
@ -18,15 +18,15 @@ package config
|
|||||||
|
|
||||||
// ClientConnectionConfiguration contains details for constructing a client.
|
// ClientConnectionConfiguration contains details for constructing a client.
|
||||||
type ClientConnectionConfiguration struct {
|
type ClientConnectionConfiguration struct {
|
||||||
// kubeConfigFile is the path to a kubeconfig file.
|
// kubeconfig is the path to a KubeConfig file.
|
||||||
KubeConfigFile string
|
Kubeconfig string
|
||||||
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
||||||
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
||||||
// client.
|
// client.
|
||||||
AcceptContentTypes string
|
AcceptContentTypes string
|
||||||
// contentType is the content type used when sending data to the server from this client.
|
// contentType is the content type used when sending data to the server from this client.
|
||||||
ContentType string
|
ContentType string
|
||||||
// cps controls the number of queries per second allowed for this connection.
|
// qps controls the number of queries per second allowed for this connection.
|
||||||
QPS float32
|
QPS float32
|
||||||
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
||||||
Burst int32
|
Burst int32
|
||||||
|
@ -18,15 +18,15 @@ package v1alpha1
|
|||||||
|
|
||||||
// ClientConnectionConfiguration contains details for constructing a client.
|
// ClientConnectionConfiguration contains details for constructing a client.
|
||||||
type ClientConnectionConfiguration struct {
|
type ClientConnectionConfiguration struct {
|
||||||
// kubeConfigFile is the path to a kubeconfig file.
|
// kubeconfig is the path to a KubeConfig file.
|
||||||
KubeConfigFile string `json:"kubeconfig"`
|
Kubeconfig string `json:"kubeconfig"`
|
||||||
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
// acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the
|
||||||
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
// default value of 'application/json'. This field will control all connections to the server used by a particular
|
||||||
// client.
|
// client.
|
||||||
AcceptContentTypes string `json:"acceptContentTypes"`
|
AcceptContentTypes string `json:"acceptContentTypes"`
|
||||||
// contentType is the content type used when sending data to the server from this client.
|
// contentType is the content type used when sending data to the server from this client.
|
||||||
ContentType string `json:"contentType"`
|
ContentType string `json:"contentType"`
|
||||||
// cps controls the number of queries per second allowed for this connection.
|
// qps controls the number of queries per second allowed for this connection.
|
||||||
QPS float32 `json:"qps"`
|
QPS float32 `json:"qps"`
|
||||||
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
// burst allows extra queries to accumulate when a client is exceeding its rate.
|
||||||
Burst int32 `json:"burst"`
|
Burst int32 `json:"burst"`
|
||||||
|
@ -47,7 +47,7 @@ func RegisterConversions(s *runtime.Scheme) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *config.ClientConnectionConfiguration, s conversion.Scope) error {
|
func autoConvert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *config.ClientConnectionConfiguration, s conversion.Scope) error {
|
||||||
out.KubeConfigFile = in.KubeConfigFile
|
out.Kubeconfig = in.Kubeconfig
|
||||||
out.AcceptContentTypes = in.AcceptContentTypes
|
out.AcceptContentTypes = in.AcceptContentTypes
|
||||||
out.ContentType = in.ContentType
|
out.ContentType = in.ContentType
|
||||||
out.QPS = in.QPS
|
out.QPS = in.QPS
|
||||||
@ -61,7 +61,7 @@ func Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *config.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error {
|
func autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *config.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error {
|
||||||
out.KubeConfigFile = in.KubeConfigFile
|
out.Kubeconfig = in.Kubeconfig
|
||||||
out.AcceptContentTypes = in.AcceptContentTypes
|
out.AcceptContentTypes = in.AcceptContentTypes
|
||||||
out.ContentType = in.ContentType
|
out.ContentType = in.ContentType
|
||||||
out.QPS = in.QPS
|
out.QPS = in.QPS
|
||||||
|
Loading…
Reference in New Issue
Block a user