mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
Allow server and client to take api version as argument
* Defaults to v1beta1 * apiserver takes -storage_version which controls etcd storage version and the version of the client used to connect to other apiservers * Changed signature of client.New to add version parameter * All controller code and component code prefers the oldest (most common) server version
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz"
|
||||
masterPkg "github.com/GoogleCloudPlatform/kubernetes/pkg/master"
|
||||
@@ -46,7 +47,7 @@ func main() {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
// TODO: security story for plugins!
|
||||
kubeClient, err := client.New(*master, nil)
|
||||
kubeClient, err := client.New(*master, latest.OldestVersion, nil)
|
||||
if err != nil {
|
||||
glog.Fatalf("Invalid -master: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user