Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for Kubernetes v1.9 #2343

Merged
merged 6 commits into from
Dec 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3,732 changes: 1,894 additions & 1,838 deletions Godeps/Godeps.json

Large diffs are not rendered by default.

27 changes: 21 additions & 6 deletions hack/kube-proxy-patch.diff
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go
index b0f0eace5..02b631fb6 100644
--- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go
+++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server_others.go
@@ -60,7 +60,7 @@ func NewProxyServer(config *componentconfig.KubeProxyConfiguration, cleanupAndEx
diff --git a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go
index 2f9ea2eac..35a7c14e5 100644
--- a/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go
+++ b/vendor/k8s.io/kubernetes/cmd/kube-proxy/app/server.go
@@ -318,6 +318,10 @@ func (o *Options) ApplyDefaults(in *kubeproxyconfig.KubeProxyConfiguration) (*ku
return out, nil
}

+func (o *Options) SetConfig(in *kubeproxyconfig.KubeProxyConfiguration) {
+ o.config = in
+}
+
// NewProxyCommand creates a *cobra.Command object with default parameters
func NewProxyCommand() *cobra.Command {
opts := NewOptions()
diff --git a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/server.go b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/server.go
index 93982f898..a116da41f 100644
--- a/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/server.go
+++ b/vendor/k8s.io/kubernetes/plugin/cmd/kube-scheduler/app/server.go
@@ -380,7 +380,7 @@ func NewSchedulerServer(config *componentconfig.KubeSchedulerConfiguration, mast
if c, err := configz.New("componentconfig"); err == nil {
c.Set(config)
} else {
- return nil, fmt.Errorf("unable to register configz: %s", err)
+ glog.Warningf("unable to register configz: %s", err)
}

protocol := utiliptables.ProtocolIpv4
// Prepare some Kube clients.
25 changes: 13 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,36 @@ 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)
}
opts.SetConfig(config)

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()
}
}
20 changes: 16 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,29 @@ func (lk LocalkubeServer) NewSchedulerServer() Server {
}

func StartSchedulerServer(lk LocalkubeServer) func() error {
config := options.NewSchedulerServer()
config := &componentconfig.KubeSchedulerConfiguration{}
opts, err := scheduler.NewOptions()
if err != nil {
panic(err)
}
config, err = opts.ApplyDefaults(config)
if err != nil {
panic(err)
}

// 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
5 changes: 5 additions & 0 deletions vendor/github.com/Azure/azure-sdk-for-go/NOTICE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions vendor/github.com/Azure/azure-sdk-for-go/arm/compute/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading