mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
vendor updates
This commit is contained in:
23
vendor/k8s.io/kubernetes/cmd/kubectl/BUILD
generated
vendored
23
vendor/k8s.io/kubernetes/cmd/kubectl/BUILD
generated
vendored
@ -7,19 +7,8 @@ load("//pkg/version:def.bzl", "version_x_defs")
|
||||
|
||||
go_binary(
|
||||
name = "kubectl",
|
||||
gc_linkopts = select({
|
||||
# Mac OS X doesn't support static binaries:
|
||||
# https://developer.apple.com/library/content/qa/qa1118/_index.html
|
||||
"@io_bazel_rules_go//go/platform:darwin_amd64": [],
|
||||
"//conditions:default": [
|
||||
"-linkmode",
|
||||
"external",
|
||||
"-extldflags",
|
||||
"-static",
|
||||
],
|
||||
}),
|
||||
importpath = "k8s.io/kubernetes/cmd/kubectl",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
pure = "on",
|
||||
visibility = ["//visibility:public"],
|
||||
x_defs = version_x_defs(),
|
||||
)
|
||||
@ -29,7 +18,13 @@ go_library(
|
||||
srcs = ["kubectl.go"],
|
||||
importpath = "k8s.io/kubernetes/cmd/kubectl",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = ["//cmd/kubectl/app:go_default_library"],
|
||||
deps = [
|
||||
"//pkg/kubectl/cmd:go_default_library",
|
||||
"//vendor/github.com/spf13/pflag:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/flag:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library",
|
||||
"//vendor/k8s.io/client-go/plugin/pkg/client/auth:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
|
30
vendor/k8s.io/kubernetes/cmd/kubectl/kubectl.go
generated
vendored
30
vendor/k8s.io/kubernetes/cmd/kubectl/kubectl.go
generated
vendored
@ -17,16 +17,38 @@ limitations under the License.
|
||||
package main
|
||||
|
||||
import (
|
||||
goflag "flag"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/cmd/kubectl/app"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
utilflag "k8s.io/apiserver/pkg/util/flag"
|
||||
"k8s.io/apiserver/pkg/util/logs"
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
|
||||
// Import to initialize client auth plugins.
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := app.Run(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
|
||||
command := cmd.NewDefaultKubectlCommand()
|
||||
|
||||
// TODO: once we switch everything over to Cobra commands, we can go back to calling
|
||||
// utilflag.InitFlags() (by removing its pflag.Parse() call). For now, we have to set the
|
||||
// normalize func and add the go flag set by hand.
|
||||
pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc)
|
||||
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)
|
||||
// utilflag.InitFlags()
|
||||
logs.InitLogs()
|
||||
defer logs.FlushLogs()
|
||||
|
||||
if err := command.Execute(); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user