mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 13:14:05 +00:00
Add context object to kubecfg/client
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
_ "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz"
|
||||
@@ -47,7 +48,8 @@ func main() {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
||||
// TODO: security story for plugins!
|
||||
kubeClient, err := client.New(*master, latest.OldestVersion, nil)
|
||||
ctx := api.NewContext()
|
||||
kubeClient, err := client.New(ctx, *master, latest.OldestVersion, nil)
|
||||
if err != nil {
|
||||
glog.Fatalf("Invalid -master: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user