diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index eed14c0c50..6f29555fed 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -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,IntVal 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,Debugging API rule violation: names_match,k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1,CloudControllerManagerConfiguration,GenericComponent diff --git a/cmd/kube-scheduler/app/options/deprecated.go b/cmd/kube-scheduler/app/options/deprecated.go index 4a772d3c7d..a85681f44e 100644 --- a/cmd/kube-scheduler/app/options/deprecated.go +++ b/cmd/kube-scheduler/app/options/deprecated.go @@ -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.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.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") diff --git a/cmd/kube-scheduler/app/options/options.go b/cmd/kube-scheduler/app/options/options.go index a1f1c32e96..cb98f5e3ec 100644 --- a/cmd/kube-scheduler/app/options/options.go +++ b/cmd/kube-scheduler/app/options/options.go @@ -263,14 +263,14 @@ func makeLeaderElectionConfig(config componentconfig.KubeSchedulerLeaderElection // createClients creates a kube client and an event client from the given config and masterOverride. // 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) { - 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.") } // This creates a client, first loading any specified kubeconfig // file, and then overriding the Master flag, if non-empty. kubeConfig, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( - &clientcmd.ClientConfigLoadingRules{ExplicitPath: config.KubeConfigFile}, + &clientcmd.ClientConfigLoadingRules{ExplicitPath: config.Kubeconfig}, &clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterOverride}}).ClientConfig() if err != nil { return nil, nil, nil, err diff --git a/cmd/kube-scheduler/app/options/options_test.go b/cmd/kube-scheduler/app/options/options_test.go index 455b4d6ef2..e241822bf4 100644 --- a/cmd/kube-scheduler/app/options/options_test.go +++ b/cmd/kube-scheduler/app/options/options_test.go @@ -142,7 +142,7 @@ users: options: &Options{ ComponentConfig: componentconfig.KubeSchedulerConfiguration{ ClientConnection: componentconfig.ClientConnectionConfiguration{ - KubeConfigFile: flagKubeconfig}}}, + Kubeconfig: flagKubeconfig}}}, expectedUsername: "flag", }, { diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 51f79b1513..c64523ed16 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -22,15 +22,15 @@ import ( // ClientConnectionConfiguration contains details for constructing a client. type ClientConnectionConfiguration struct { - // kubeConfigFile is the path to a kubeconfig file. - KubeConfigFile string + // kubeconfig is the path to a KubeConfig file. + Kubeconfig string // 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 // client. AcceptContentTypes string // contentType is the content type used when sending data to the server from this client. 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 // burst allows extra queries to accumulate when a client is exceeding its rate. Burst int32 diff --git a/pkg/apis/componentconfig/v1alpha1/types.go b/pkg/apis/componentconfig/v1alpha1/types.go index 55b10a1151..5b9b9eb943 100644 --- a/pkg/apis/componentconfig/v1alpha1/types.go +++ b/pkg/apis/componentconfig/v1alpha1/types.go @@ -22,15 +22,15 @@ import ( // ClientConnectionConfiguration contains details for constructing a client. type ClientConnectionConfiguration struct { - // kubeConfigFile is the path to a kubeconfig file. - KubeConfigFile string `json:"kubeconfig"` + // kubeconfig is the path to a KubeConfig file. + Kubeconfig string `json:"kubeconfig"` // 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 // client. AcceptContentTypes string `json:"acceptContentTypes"` // contentType is the content type used when sending data to the server from this client. 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"` // burst allows extra queries to accumulate when a client is exceeding its rate. Burst int32 `json:"burst"` diff --git a/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go b/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go index f9d3f7f492..c0623b2228 100644 --- a/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go @@ -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 { - out.KubeConfigFile = in.KubeConfigFile + out.Kubeconfig = in.Kubeconfig out.AcceptContentTypes = in.AcceptContentTypes out.ContentType = in.ContentType 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 { - out.KubeConfigFile = in.KubeConfigFile + out.Kubeconfig = in.Kubeconfig out.AcceptContentTypes = in.AcceptContentTypes out.ContentType = in.ContentType out.QPS = in.QPS diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/config/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/config/types.go index 9b1a218a47..b32fc8a281 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/config/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/config/types.go @@ -18,15 +18,15 @@ package config // ClientConnectionConfiguration contains details for constructing a client. type ClientConnectionConfiguration struct { - // kubeConfigFile is the path to a kubeconfig file. - KubeConfigFile string + // kubeconfig is the path to a KubeConfig file. + Kubeconfig string // 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 // client. AcceptContentTypes string // contentType is the content type used when sending data to the server from this client. 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 // burst allows extra queries to accumulate when a client is exceeding its rate. Burst int32 diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go b/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go index aacc16443d..b762c4f0bb 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go @@ -18,15 +18,15 @@ package v1alpha1 // ClientConnectionConfiguration contains details for constructing a client. type ClientConnectionConfiguration struct { - // kubeConfigFile is the path to a kubeconfig file. - KubeConfigFile string `json:"kubeconfig"` + // kubeconfig is the path to a KubeConfig file. + Kubeconfig string `json:"kubeconfig"` // 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 // client. AcceptContentTypes string `json:"acceptContentTypes"` // contentType is the content type used when sending data to the server from this client. 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"` // burst allows extra queries to accumulate when a client is exceeding its rate. Burst int32 `json:"burst"` diff --git a/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go b/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go index 792cfc677b..13f576d06c 100644 --- a/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go +++ b/staging/src/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go @@ -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 { - out.KubeConfigFile = in.KubeConfigFile + out.Kubeconfig = in.Kubeconfig out.AcceptContentTypes = in.AcceptContentTypes out.ContentType = in.ContentType 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 { - out.KubeConfigFile = in.KubeConfigFile + out.Kubeconfig = in.Kubeconfig out.AcceptContentTypes = in.AcceptContentTypes out.ContentType = in.ContentType out.QPS = in.QPS