Skip to content

Commit eda8062

Browse files
author
dlorenc
committed
Manual changes for 1.9 update.
1 parent 77d1bed commit eda8062

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

Diff for: pkg/localkube/proxy.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ import (
2323
"time"
2424

2525
"k8s.io/apimachinery/pkg/apis/meta/v1"
26-
"k8s.io/apimachinery/pkg/runtime"
27-
"k8s.io/kubernetes/pkg/apis/componentconfig"
2826
"k8s.io/kubernetes/pkg/kubelet/qos"
27+
"k8s.io/kubernetes/pkg/proxy/apis/kubeproxyconfig"
2928
)
3029

3130
var (
@@ -42,34 +41,35 @@ func StartProxyServer(lk LocalkubeServer) func() error {
4241
if lk.APIServerInsecurePort != 0 {
4342
bindaddress = lk.APIServerInsecureAddress.String()
4443
}
45-
config := &componentconfig.KubeProxyConfiguration{
44+
45+
opts := kubeproxy.NewOptions()
46+
config := &kubeproxyconfig.KubeProxyConfiguration{
4647
OOMScoreAdj: &OOMScoreAdj,
47-
ClientConnection: componentconfig.ClientConnectionConfiguration{
48+
ClientConnection: kubeproxyconfig.ClientConnectionConfiguration{
4849
Burst: 10,
4950
QPS: 5,
5051
KubeConfigFile: util.DefaultKubeConfigPath,
5152
},
5253
ConfigSyncPeriod: v1.Duration{Duration: 15 * time.Minute},
53-
IPTables: componentconfig.KubeProxyIPTablesConfiguration{
54+
IPTables: kubeproxyconfig.KubeProxyIPTablesConfiguration{
5455
MasqueradeBit: &MasqueradeBit,
5556
SyncPeriod: v1.Duration{Duration: 30 * time.Second},
5657
MinSyncPeriod: v1.Duration{Duration: 5 * time.Second},
5758
},
5859
BindAddress: bindaddress,
59-
Mode: componentconfig.ProxyModeIPTables,
60+
Mode: kubeproxyconfig.ProxyModeIPTables,
6061
FeatureGates: lk.FeatureGates,
6162
// Disable the healthz check
6263
HealthzBindAddress: "0",
6364
}
65+
_, err := opts.ApplyDefaults(config)
66+
if err != nil {
67+
panic(err)
68+
}
6469

6570
lk.SetExtraConfigForComponent("proxy", &config)
6671

6772
return func() error {
68-
// Creating this config requires the API Server to be up, so do it in the start function itself.
69-
server, err := kubeproxy.NewProxyServer(config, false, runtime.NewScheme(), lk.GetAPIServerInsecureURL())
70-
if err != nil {
71-
panic(err)
72-
}
73-
return server.Run()
73+
return opts.Run()
7474
}
7575
}

Diff for: pkg/localkube/scheduler.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ limitations under the License.
1717
package localkube
1818

1919
import (
20+
"k8s.io/kubernetes/pkg/apis/componentconfig"
2021
scheduler "k8s.io/kubernetes/plugin/cmd/kube-scheduler/app"
21-
"k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/options"
2222
"k8s.io/minikube/pkg/util"
2323
)
2424

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

2929
func StartSchedulerServer(lk LocalkubeServer) func() error {
30-
config := options.NewSchedulerServer()
30+
config := componentconfig.KubeSchedulerConfiguration{}
3131

3232
// master details
33-
config.Kubeconfig = util.DefaultKubeConfigPath
33+
config.ClientConnection.KubeConfigFile = util.DefaultKubeConfigPath
3434

3535
// defaults from command
3636
config.EnableProfiling = true
3737

3838
lk.SetExtraConfigForComponent("scheduler", &config)
3939

4040
return func() error {
41-
return scheduler.Run(config)
41+
s, err := scheduler.NewSchedulerServer(&config, "")
42+
if err != nil {
43+
return err
44+
}
45+
return s.Run(nil)
4246
}
4347
}

Diff for: test/integration/cluster_status_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"testing"
2424
"time"
2525

26-
"k8s.io/kubernetes/pkg/api"
26+
api "k8s.io/kubernetes/pkg/apis/core"
2727
"k8s.io/minikube/test/integration/util"
2828
)
2929

Diff for: test/integration/pv_test.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ package integration
2020

2121
import (
2222
"fmt"
23-
"github.com/pkg/errors"
2423
"path/filepath"
2524
"testing"
2625
"time"
2726

27+
"github.com/pkg/errors"
28+
2829
"k8s.io/apimachinery/pkg/labels"
29-
"k8s.io/kubernetes/pkg/api"
30+
api "k8s.io/kubernetes/pkg/apis/core"
3031
"k8s.io/kubernetes/pkg/apis/storage"
3132
commonutil "k8s.io/minikube/pkg/util"
3233
"k8s.io/minikube/test/integration/util"

0 commit comments

Comments
 (0)