Updated references from k8s.io/{apiserver,apimachinery} to the new k8s.io/component-base repo. Co-authored-by @Klaven

This commit is contained in:
Lucas Käldström
2019-01-06 14:01:26 +02:00
parent 2e52d5c331
commit 0140c82c16
23 changed files with 71 additions and 82 deletions

View File

@@ -19,7 +19,7 @@ package options
import (
"github.com/spf13/pflag"
apiserverconfig "k8s.io/apiserver/pkg/apis/config"
componentbaseconfig "k8s.io/component-base/config"
)
// DebuggingOptions holds the Debugging options.
@@ -41,7 +41,7 @@ func (o *DebuggingOptions) AddFlags(fs *pflag.FlagSet) {
}
// ApplyTo fills up Debugging config with options.
func (o *DebuggingOptions) ApplyTo(cfg *apiserverconfig.DebuggingConfiguration) error {
func (o *DebuggingOptions) ApplyTo(cfg *componentbaseconfig.DebuggingConfiguration) error {
if o == nil {
return nil
}

View File

@@ -20,11 +20,10 @@ import (
"fmt"
"strings"
apimachineryconfig "k8s.io/apimachinery/pkg/apis/config"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/sets"
apiserverconfig "k8s.io/apiserver/pkg/apis/config"
apiserverflag "k8s.io/apiserver/pkg/util/flag"
componentbaseconfig "k8s.io/component-base/config"
"k8s.io/kubernetes/pkg/client/leaderelectionconfig"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
)
@@ -34,9 +33,9 @@ type GenericControllerManagerConfigurationOptions struct {
Port int32
Address string
MinResyncPeriod metav1.Duration
ClientConnection apimachineryconfig.ClientConnectionConfiguration
ClientConnection componentbaseconfig.ClientConnectionConfiguration
ControllerStartInterval metav1.Duration
LeaderElection apiserverconfig.LeaderElectionConfiguration
LeaderElection componentbaseconfig.LeaderElectionConfiguration
Debugging *DebuggingOptions
Controllers []string
}

View File

@@ -21,7 +21,6 @@ import (
"net/http"
goruntime "runtime"
apiserverconfig "k8s.io/apiserver/pkg/apis/config"
genericapifilters "k8s.io/apiserver/pkg/endpoints/filters"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
apiserver "k8s.io/apiserver/pkg/server"
@@ -29,6 +28,7 @@ import (
"k8s.io/apiserver/pkg/server/healthz"
"k8s.io/apiserver/pkg/server/mux"
"k8s.io/apiserver/pkg/server/routes"
componentbaseconfig "k8s.io/component-base/config"
"k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/util/configz"
)
@@ -52,7 +52,7 @@ func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.Aut
}
// NewBaseHandler takes in CompletedConfig and returns a handler.
func NewBaseHandler(c *apiserverconfig.DebuggingConfiguration, checks ...healthz.HealthzChecker) *mux.PathRecorderMux {
func NewBaseHandler(c *componentbaseconfig.DebuggingConfiguration, checks ...healthz.HealthzChecker) *mux.PathRecorderMux {
mux := mux.NewPathRecorderMux("controller-manager")
healthz.InstallHandler(mux, checks...)
if c.EnableProfiling {