Skip to content

Commit

Permalink
Manual changes for 1.10 update.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlorenc committed Dec 18, 2017
1 parent 19c1e28 commit 986e8bd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
24 changes: 12 additions & 12 deletions pkg/localkube/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import (
"time"

"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubernetes/pkg/apis/componentconfig"
"k8s.io/kubernetes/pkg/kubelet/qos"
"k8s.io/kubernetes/pkg/proxy/apis/kubeproxyconfig"
)

var (
Expand All @@ -42,34 +41,35 @@ func StartProxyServer(lk LocalkubeServer) func() error {
if lk.APIServerInsecurePort != 0 {
bindaddress = lk.APIServerInsecureAddress.String()
}
config := &componentconfig.KubeProxyConfiguration{

opts := kubeproxy.NewOptions()
config := &kubeproxyconfig.KubeProxyConfiguration{
OOMScoreAdj: &OOMScoreAdj,
ClientConnection: componentconfig.ClientConnectionConfiguration{
ClientConnection: kubeproxyconfig.ClientConnectionConfiguration{
Burst: 10,
QPS: 5,
KubeConfigFile: util.DefaultKubeConfigPath,
},
ConfigSyncPeriod: v1.Duration{Duration: 15 * time.Minute},
IPTables: componentconfig.KubeProxyIPTablesConfiguration{
IPTables: kubeproxyconfig.KubeProxyIPTablesConfiguration{
MasqueradeBit: &MasqueradeBit,
SyncPeriod: v1.Duration{Duration: 30 * time.Second},
MinSyncPeriod: v1.Duration{Duration: 5 * time.Second},
},
BindAddress: bindaddress,
Mode: componentconfig.ProxyModeIPTables,
Mode: kubeproxyconfig.ProxyModeIPTables,
FeatureGates: lk.FeatureGates,
// Disable the healthz check
HealthzBindAddress: "0",
}
_, err := opts.ApplyDefaults(config)
if err != nil {
panic(err)
}

lk.SetExtraConfigForComponent("proxy", &config)

return func() error {
// Creating this config requires the API Server to be up, so do it in the start function itself.
server, err := kubeproxy.NewProxyServer(config, false, runtime.NewScheme(), lk.GetAPIServerInsecureURL())
if err != nil {
panic(err)
}
return server.Run()
return opts.Run()
}
}
12 changes: 8 additions & 4 deletions pkg/localkube/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package localkube

import (
"k8s.io/kubernetes/pkg/apis/componentconfig"
scheduler "k8s.io/kubernetes/plugin/cmd/kube-scheduler/app"
"k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options"
"k8s.io/minikube/pkg/util"
)

Expand All @@ -27,17 +27,21 @@ func (lk LocalkubeServer) NewSchedulerServer() Server {
}

func StartSchedulerServer(lk LocalkubeServer) func() error {
config := options.NewSchedulerServer()
config := componentconfig.KubeSchedulerConfiguration{}

// master details
config.Kubeconfig = util.DefaultKubeConfigPath
config.ClientConnection.KubeConfigFile = util.DefaultKubeConfigPath

// defaults from command
config.EnableProfiling = true

lk.SetExtraConfigForComponent("scheduler", &config)

return func() error {
return scheduler.Run(config)
s, err := scheduler.NewSchedulerServer(&config, "")
if err != nil {
return err
}
return s.Run(nil)
}
}
2 changes: 1 addition & 1 deletion test/integration/cluster_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"
"time"

"k8s.io/kubernetes/pkg/api"
api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/minikube/test/integration/util"
)

Expand Down
5 changes: 3 additions & 2 deletions test/integration/pv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ package integration

import (
"fmt"
"github.com/pkg/errors"
"path/filepath"
"testing"
"time"

"github.com/pkg/errors"

"k8s.io/apimachinery/pkg/labels"
"k8s.io/kubernetes/pkg/api"
api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/apis/storage"
commonutil "k8s.io/minikube/pkg/util"
"k8s.io/minikube/test/integration/util"
Expand Down

0 comments on commit 986e8bd

Please sign in to comment.