Remove references to the config structs that have moved to their own shared packages

This commit is contained in:
Lucas Käldström
2018-08-14 19:02:06 +03:00
parent 6274590518
commit 4bef926218
13 changed files with 59 additions and 165 deletions

View File

@@ -27,6 +27,7 @@ import (
"github.com/spf13/pflag"
corev1 "k8s.io/api/core/v1"
apimachineryconfig "k8s.io/apimachinery/pkg/apis/config"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
apiserveroptions "k8s.io/apiserver/pkg/server/options"
@@ -262,7 +263,7 @@ 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) {
func createClients(config apimachineryconfig.ClientConnectionConfiguration, masterOverride string, timeout time.Duration) (clientset.Interface, clientset.Interface, v1core.EventsGetter, error) {
if len(config.Kubeconfig) == 0 && len(masterOverride) == 0 {
glog.Warningf("Neither --kubeconfig nor --master was specified. Using default API client. This might not work.")
}

View File

@@ -26,6 +26,7 @@ import (
"strings"
"testing"
apimachineryconfig "k8s.io/apimachinery/pkg/apis/config"
"k8s.io/kubernetes/pkg/apis/componentconfig"
)
@@ -141,7 +142,7 @@ users:
name: "kubeconfig flag",
options: &Options{
ComponentConfig: componentconfig.KubeSchedulerConfiguration{
ClientConnection: componentconfig.ClientConnectionConfiguration{
ClientConnection: apimachineryconfig.ClientConnectionConfiguration{
Kubeconfig: flagKubeconfig}}},
expectedUsername: "flag",
},